January 2019
Beginner
318 pages
8h 23m
English
Python's triple quotes functionality for strings is used to span multiple lines, including newlines and tabs. The syntax for triple quotes consists of three consecutive single or double quotes. Refer to the following code:
#!/usr/bin/python3para_str = """ Python is a scripting language which was created byGuido van Rossum in 1991, t which is used in various sectors such as Game Development, GIS Programming, Software Development, web development,Data Analytics and Machine learning, System Scripting etc."""print (para_str)
It produces the following output. Note the tabs and newlines:
Output:Python is a scripting language which was created byGuido van Rossum in 1991, which is used in various sectors such asGame Development, ...
Read now
Unlock full access