博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
合数据类型练习
阅读量:7021 次
发布时间:2019-06-28

本文共 521 字,大约阅读时间需要 1 分钟。

# 字符串sen = 'this'print(type(sen))print(sen)# 数组list1 = ['this', 'is', 'a', 'python', 'project']for i in list1:    print(i)print(len(list1))print(type(list1))# 元组tu = tuple(list1)print(tu)print(type(tu))for u in tu:    print(u)print(tu[2])# 字典di = {
'kkk': 116, 'hhh': 117, 'ggg': 118}print(di['hhh'])# print(di)for key in di: print((str(key) + ':' + str(di[key])))# 集合s = set([3, 4, 5, 6, 6, 3, 6])#重复元素会被自动过滤print(s)s.add("a")print(s)for ss in s: print(ss)

 

转载于:https://www.cnblogs.com/2015110114z/p/8627116.html

你可能感兴趣的文章
javase大作业反思
查看>>
软件测试的维恩图
查看>>
UVA 10417 Gift Exchanging
查看>>
掉了,全掉了。
查看>>
JavaWeb常见错误总结
查看>>
用vscode开发vue应用
查看>>
[Visual Studio] 自定义类模板
查看>>
关于ant引用android第三方工程打包的问题, invalid resource directory name: F:\workspace\Zlib\bin\res/crunch...
查看>>
移动端响应式【我的代码】
查看>>
css让元素不可点击 pointer-events: none;
查看>>
编程之美 第1章 游戏之乐——游戏中碰到的题目(八)
查看>>
TcpListener和tcpclient使用
查看>>
如何成为一名优秀的php程序员
查看>>
scp和sftp常用操作
查看>>
多线程以及抓取图片。
查看>>
苹果企业开发和教育开发相关专题
查看>>
【分享】20个非常有用的Java程序片段
查看>>
Codeforces Round #294 (Div. 2) A and B and Lecture Rooms(LCA 倍增)
查看>>
SpringBoot 使用MultipartFile上传文件相关问题解决方案
查看>>
selenium-如何上传非input格式的图片
查看>>