一. 課上代碼
#怎么樣打出一整行包含各式符號(hào)的字符串以及怎么樣打出一首詩(shī)
>>> teacher = 'Jack'
>>> print(teacher)
Jack
>>> teacher = 'Big Jack'
>>> print(teacher)
Big Jack
>>> first = 3
>>> second = 8
>>> third = first + second
>>> print(third)
11
>>> myteacher = 'Jack'
>>> yourteacher = 'David'
>>> ourteacher = myteacher + yourteacher
>>> print(ourteacher)
JackDavid
>>> first
3
>>> 5 + 8
13
>>> '5' + '8'
'58'
>>> str = 'Let\'s go!'
>>> print(str)
Let's go!
>>> str1 = 'C:\\now'
>>> print(str1)
C:\now
>>> str2 = r'C:\Program Files\Intel\WiFi\Help'
>>> print(str2)
C:\Program Files\Intel\WiFi\Help
>>> str3 = """"""
>>> str3 = """So baby do not cry,
tonight,
If I love you,
I would never say goodbye.
If I love you,
I would never lie to you."""
>>> print(str3)
So baby do not cry,
tonight,
If I love you,
I would never say goodbye.
If I love you,
I would never lie to you.