x = 10
y = 10
z = 10
#
x=y=z=10
x = 10
y = 20
#
t=x
x=y
y=t
#
x,y=y,x
nick
的第2、3个爱好:nick_info_dict = {
'name':'nick',
'age':'18',
'height':180,
'weight':140,
'hobby_list':['read','run','music','code'],
}
#
print(nick_info_dict['hobby_list'][1],nick_info_dict['hobby_list'][2])
'''
name = 'Nick'
height = 180
weight = 140
# "My name is 'Nick', my height is 180, my weight is 140"
print("My name is '%s',my height is %s,my weight is %s" %('jinhongquan',173,110))
'''
name = 'jinhongquan'
height = 173
weight = 110
print('My name is "%s",my height is %s,my weight is %s' %(name,height,weight))
print('My name is "{}",my height is {},my weight is {}'.format(name,height,weight))
print(f'My name is "{name}",my height is {height},my weight is {weight}')
原文:https://www.cnblogs.com/jinhongquan/p/11497799.html