您当前的位置: 首页 >  彭世瑜 Python

Python编程:six库兼容Python 2 和 Python 3

彭世瑜 发布时间:2019-05-12 23:02:42 ,浏览量:4

six 它是一个专门用来兼容 Python 2 和 Python 3 的库

pip install six

PyPI : https://pypi.org/project/six/ 文档:https://six.readthedocs.io/ github: https://github.com/benjaminp/six

Python 2.7.5

>>> import six

>>> six.PY2
True

>>> six.PY3
False

关注
打赏
1688896170
查看更多评论

彭世瑜

暂无认证

  • 4浏览

    0关注

    2727博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0562s