Python2 和 Python3区别
2024-10-21 10:26:30
字符串类型不同
py3: str bytes
py2: unicode str
默认解释器编码
输入输出
int
int long
除法
range和xrang
模块和包
字典
keys
py2:列表
py3:迭代器,可以循环但不可以索引
values
py2:列表
py3:迭代器,可以循环但不可以索引
items
py2:列表
py3:迭代器,可以循环但不可以索引
map/filter
py2:返回列表
py3:返回迭代器,可以循环但不可以索引
最新文章
- 为.NET搭建Linux的开发环境,鄙视那些将简单事情复杂化的人
- 关于/usr/local/lib/libz.a(zutil.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC解决办法
- Tuxedo 超时时间控制(转贴)
- Hive_初步见解,安装部署与测试
- ubuntu下firefox无法看bilibili解决方案
- javascript (js)中的基本概念
- Qt 类外调用一个 private slots 函数
- 1、搭建springMVC开发环境以及HelloWorld测试
- CSS结构伪类E:first-child/last-child/only-child/empty
- 自动化测试CTS命令
- 【浏览器那些基础】Android平台有那些CPU类型
- hadoop、Storm该选哪一个
- java.lang.SecurityException: Can't make field constructor accessible
- IP基本原理
- nginx http2 push 试用
- js 提示框的实现---组件开发之(一)
- Ubuntu 16.04 LTS network DIASBLED解决办法
- 时间模块 --- time
- 程序模拟HTTP请求
- 如何向女朋友解释int==Integer为true
热门文章
- Numpy | 09 高级索引
- Struts2框架的搭建
- OJ笔记
- vuex实现登录状态的存储,未登录状态不允许浏览
- ImportError: No module named 'typing'
- shell 判断大小
- mybatis 根据多个id查询数据 foreach标签
- Excel填坑[0]
- Refused to execute script from '...' because its MIME type ('') is not executable, and strict MIME type checking is enabled.
- ps 渐进式图片的技巧(支持jpg,gif,png)