Python 03

一. 课上代码

#怎么样打出一整行包含各式符号的字符串以及怎么样打出一首诗
>>> 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.

你可能感兴趣的:(Python 03)