a = 12
print(a)
"任何在这双引号之间的文字"
'单引号其实和双引号完全一样'
'''三引号被用于过长段的文
字或者是说明,只要三引号不完
你就可以随意换行写下文字'''
what_he_does = ' plays '
his_instrument = 'guitar'
his_name = 'Robert Johnson'
artist_intro = his_name + what_he_does + his_instrument
print(artist_intro) #Robert Johnson plays guitar
num = 1
string = '1'
print(type(num)) #<class 'int'>
print(type(string)) #<class 'str'>
print(num + string) #error
num = 1
string = '1'
num2 = int(string)
print(num + num2) #2
words = 'words' * 3
print(words)#wordswordswords
name = 'My name is Mike'
print(name[-4])
print(name[11:14])
print(name[11:15])
print(name[5:])
print(name[:5])
'''
M
Mik
Mike
me is Mike
My na
'''
print('{} a word she can get what she {} for.'.format('With','came'))
print('{preposition} a word she can get what she {verb} for'.format(preposition = 'With',verb = 'came'))
print('{0} a word she can get what she {1} for.'.format('With','came'))