Python-原始段落顯示方法-三個單引號或雙引號
一般指定一個單引號或雙引號的字串給變數時,無法斷行,要斷行或空格需要使用特殊符號’\n' 及'\t'。
>>> s='\nHello \n Where are you \nHear Hear\n\n'
>>> print s
Hello
Where are you
Hear Hear
>>> s='''
... Hello
... Where are you
... Hear Hear
...
... '''
>>> s
'\nHello \n Where are you \nHear Hear\n\n'
>>> print s
Hello
Where are you
Hear Hear