列表、元组和字典

列表、元组和字典,列表字典

列表

name_list = ['alex', 'seven', 'eric']
或
name_list = list(['alex', 'seven', 'eric'])

元组

ages = (11, 22, 33, 44, 55)
或
ages = tuple((11, 22, 33, 44, 55))

字典

person = {"name": "mr.wu", 'age': 18}
或
person = dict({"name": "mr.wu", 'age': 18})

  

http://www.bkjia.com/Pythonjc/1292798.htmlwww.bkjia.comtruehttp://www.bkjia.com/Pythonjc/1292798.htmlTechArticle列表、元组和字典,列表字典 列表 name_list =
[‘alex’, ‘seven’, ‘eric’]或name_list = list([‘alex’, ‘seven’,
‘eric’]) 元组 ages = (11, 22, 33, 44, 55)或ages = tup…

列表

name_list = ['alex', 'seven', 'eric']
或
name_list = list(['alex', 'seven', 'eric'])

元组

ages = (11, 22, 33, 44, 55)
或
ages = tuple((11, 22, 33, 44, 55))

字典

person = {"name": "mr.wu", 'age': 18}
或
person = dict({"name": "mr.wu", 'age': 18})

  

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图