编码区别

  Python3.X版本中源码文件默认使用的是utf-8编码

 

Unicode 字符串

  Python 2有两种字符串类型:Unicode字符串和非Unicode字符串

  Python 3只有一种类型:Unicode字符串

 

个别函数区别

print 函数
2.7版本:print "hello world"  或者 print("hello world")
3.x版本:print("hello world")

  

模块命名区别

  在两个大版本中,许多相同功能的模块的名字发生了改变,部分举例如下

Python2和Python3之间的区别

 

持续更新中。。。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-05
猜你喜欢
  • 2021-09-08
  • 2021-10-14
  • 2021-10-25
  • 2021-12-31
  • 2022-02-16
相关资源
相似解决方案