组合数据类型练习

#字符串
str = 'abcd123'
for i in str:
    print(i)
#列表
list = ['Hello',  'World', 444]
for i in list:
    print(i)
#元组
tuple = ('Hello',  'World',444)
for i in tuple:
    print(i)
#字典
tinydict = {'Hello':'World', 444:4}
for k,v in tinydict.items():
    print(v)
#集合
set = set('abcd123')
for i in set:
    print(i)

posted @ 2018-03-22 16:50  120林海鑫  阅读(69)  评论(0编辑  收藏  举报