InterviewSolution
Saved Bookmarks
| 1. |
Describe Triple Quotes in Python. |
|
Answer» Python’s triple quotes comes to the rescue by allowing strings to span multiple lines, including verbatim NEWLINEs, TABs, and any other special characters. The syntax for triple quotes consists of three consecutive single or double quotes. # !/usr/bin/py thon para str = “””this is a long string that is made up of several lines and non-printable characters such as TAB ( \t ) and they will show up that way when displayed. NEWLINEs within the string, whether explicitly given like this within the brackets [ \n ], or just a NEWLINE within the variable assignment will also show up. ” ” ” print para_str; |
|