列表list练习
student_inf = [‘bob’, ‘22’, [‘play’, ‘sleeep’, ], ‘abc’, ‘21’, [‘sleep’, “basketball”, ‘ball’]]
print(student_inf[0:3])
print(student_inf[:3])
print(student_inf[2][0])
x=257
y=257
print(id(x),id(y))
格式化输出
name=input(‘please input your username:’)
age=input(‘please input your age:’)
print(‘my name is’,name,‘my age is’,age)
print(‘my name is %s,my age is %s’ % (name,age))
print(‘my name is %s,my age is %s’ %(name,age))
‘’’
my name is 输入的用户名,my age is 输入的年龄
‘’’