- Secret Recipes of the Python Ninja
- Cody Jackson
- 116字
- 2021-06-25 22:14:47
How to do it...
- A number of options are available for the Python command-line call. To enter interactive mode, call Python with no additional options:
$ python
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for
more information.
>>>
- To execute a regular Python program with no special options, add the program name:
$ python <script>.py
- To execute a series of Python commands without entering interactive mode or calling a file, use -c:
$ python -c "print('Hello World')"
- To call a Python module as a standalone program, use -m:
$ python -m random
- Discussion of the other possible options is provided in the following section.
推薦閱讀
- 少兒人工智能趣味入門:Scratch 3.0動畫與游戲編程
- Learning Scala Programming
- Java范例大全
- TensorFlow Lite移動端深度學習
- Mastering phpMyAdmin 3.4 for Effective MySQL Management
- Ext JS Data-driven Application Design
- Web程序設計(第二版)
- 琢石成器:Windows環境下32位匯編語言程序設計
- Flutter跨平臺開發入門與實戰
- Internet of Things with ESP8266
- Zabbix Performance Tuning
- IDA Pro權威指南(第2版)
- Java程序設計教程
- HTML5 Canvas核心技術:圖形、動畫與游戲開發
- C語言程序設計