2: Python Versions(Command line Python scripting)

来源:互联网 发布:瑞士 知乎 编辑:程序博客网 时间:2024/05/16 19:54

2: Python Versions

There are actually two versions of Python on this machine. We ran the last script using the defaultpython executable, which is Python version 2. We'll instead want to use Python 3, which we can access with the python3 executable.

Instructions

  • Type python3 script.py to run the file script.py using python 3.
/home/dq$ python3 script.py                                                     
Welcome to a Python script  

0 0
原创粉丝点击