xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Python 3 vs Python 2 All In One

Python 3 vs Python 2 All In One

Python 3.x 与 Python 2.x 版本区别

https://www.runoob.com/python/python-2x-3x.html

image

https://www.datacamp.com/blog/python-2-vs-3-everything-you-need-to-know

如果 Python 2.x 版本想使用使用 Python 3.x 的 print 函数,可以导入 __future__ 包;
该包禁用 Python 2.x 的 print 语句,采用 Python 3.x 的 print() 函数

ASCII vs Unicode



xrange vs range()

demos

image

$ python3 --version
# Python 3.7.3
$ which python 3
# /usr/bin/python3

$ python3 ./led.py 7

$ python --version
# Python 2.7.16
$ which python
# /usr/bin/python

$ python ./led.py 7


refs

Python errors All In One

https://www.cnblogs.com/xgqfrms/p/17269990.html

Python 2.x

https://www.runoob.com/python/python-tutorial.html

Python 3.x

https://www.runoob.com/python3/python3-tutorial.html



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @   xgqfrms  阅读(6)  评论(2编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2022-03-30 React Animation All In One
2022-03-30 TypeScript namespace All In One
2022-03-30 macOS Monterey 12.3 All In One
2021-03-30 uni-app & nvue & cli
2021-03-30 如何使用 Apple Watch 上 NFC 功能复制门禁卡 All In One
2020-03-30 @bind decorator
2020-03-30 TypeScript & global.d.ts All In One
点击右上角即可分享
微信分享提示