python2.7.x与python3.x差异

Contents

  1. __future__模块
  2. print函数
  3. 整除
  4. Unicode
  5. xrange模块
  6. Python3中的range对象的__contains__方法
  7. Raising exceptions
  8. Handling exceptions
  9. next()函数 and .next()方法
  10. For循环变量和全局命名空间泄漏
  11. 比较不可排序类型
  12. 通过input()解析用户的输入
  13. 返回可迭代对象,而不是列表
  14. 更多的关于 Python 2 和 Python 3 的文章

    参考:

    1. Python2.x与Python3.x差异
    2. Key differences between Python 2.7.x and Python 3.x