How to do it...

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

>>>
  1. To execute a regular Python program with no special options, add the program name:
      $ python <script>.py
  1. To execute a series of Python commands without entering interactive mode or calling a file, use -c:
      $ python -c "print('Hello World')"
  1. To call a Python module as a standalone program, use -m:
      $ python -m random
  1. Discussion of the other possible options is provided in the following section.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset