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
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