#-*-coding:utf-8-*-x="Hello"y=" World"Printx+yPrint "Hello"+y#repr () eval ()x = repr ("Hello") Val=eval (x)PrintxPrintValPrint "Hello"PrintStr"Hello world!") y= [1,2,3,4]Printrepr (y)PrintSTR (10000L)PrintRepr (1000L) Temp= 42Print "The temperature is"+repr (temp)#raw_input ()Name = Raw_input ("What is your name?")Print "Hello,"+ name +"!"#long strings, raw strings, and Unicode#Long StringPrint " "This is a very long string. It continues here. And it ' s not over yet. " Hello world! " Still here." "#backslash causes line break escapingPrint "Hello, world!."Print1+2+3Print "Hello World"#line break \ nPrint 'Hello \nworld!'#Print BackslashPrint 'C:\\nowhere'#Print Path---Print original stringPrint "C:\\Program Files\\fnord\\foo\\bar\\baz\\frozz\\bozz"PrintR'C:\nowhere'PrintR'C:\Program Files\fnord\foo\bar\baz\frozz\bozz'PrintR'let\ ' s go!'Print 'let\ ' s go!'#the last character of the original string cannot be a backslash#Print R "This is Illegal\"#To add a backslash to the end of the output string, you can then take a separate string to handlePrintR"This is illegal"'\\'#Unicode stringPrintU'Zhang'PrintU'Hello world!'
"Basic Python Tutorial" chapter 1th Reading notes