组合数据类型练习

'''字符串'''
str = "This is a string"
for i in str:
    print(i)
 
'''列表'''
list = ['a','b','c','hasee']
for i in list:
    print(i)
 
'''元组'''
tup = ('a','b',123,'hasee')
for i in tup:
    print(i)
 
'''字典'''
dict = {'jakey':1,'imp':2}
for k,v in dict.items():
    print(k,v)
 
'''集合'''
se = set('abc')
for i in se:
    print(i)

 

posted @ 2018-03-22 12:49  118郭耀文  阅读(80)  评论(0编辑  收藏  举报