码迷,mamicode.com
首页 > 其他好文 > 详细

组合数据类型练习

时间:2018-03-22 20:34:02      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:bsp   body   this   pos   span   col   int   for   string   

a = hello
print(a)
for i in a:
    print(i)

s = this is a string hello
ls = s.split()
print(ls)
for i in ls:
    print(i)


tup = (LiLi, ‘Jack, 21);
print(t)
for i in t:
    print(i)

names = [boy,‘man,‘women]
score = [12,35,44]
d = dict(zip(names,score))
print(d)
for i in d:
    print(i)

s = d.keys()
print(s)
for i in s:
    print(i)

 

组合数据类型练习

标签:bsp   body   this   pos   span   col   int   for   string   

原文地址:https://www.cnblogs.com/li123/p/8626236.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!