Python中[],(),{}的区别
2016-04-06 12:58
405 查看
区别如下:
{}表示字典,[]是数组,()是元组;
数组的值可以改变,可以使用切片获取部分数据;
元组的值一旦设置,不可更改,不可使用切片
{}表示字典,[]是数组,()是元组;
数组的值可以改变,可以使用切片获取部分数据;
元组的值一旦设置,不可更改,不可使用切片
相关文章推荐
- python判断语句is与==的区别
- K近邻分类算法实现 in Python
- windows64位环境下python安装numpy、scipy和matplotlib
- python socket多线程通讯实例分析(聊天室)
- Python Twisted系列教程13:使用Deferred新功能实现新客户端
- python exec eval
- python partial
- python文件的md5加密方法
- Python Twisted系列教程12:改进诗歌下载服务器
- Python Twisted系列教程11:改进诗歌下载服务器
- Python Twisted系列教程10:增强defer功能的客户端
- Python Twisted系列教程9:第二个小插曲,Deferred
- python常用用法总结
- windows 7 下安装eclipse,python,pydev,flask步骤
- python自学总结
- python学习笔记--使用ctypes调用C函数
- Python Twisted系列教程8:使用Deferred的诗歌下载客户端
- Python 第三方库的安装
- python中filter函数用法
- Python Twisted系列教程7:小插曲,Deferred