"Stupid methodology Python3" 13. Parameters, variables and unpacking

Script:
Here Insert Picture Description
Run:
Here Insert Picture Description
Notes:

  1. The Python features introduced import script, argv (argument variable) parameter variables.
  2. Start directly at the command line python ex13.py will complain, not the number of parameters.
    Here Insert Picture Description
  3. You can use repr () function to view the contents of variables.
  4. Together with the input and argv, argv execution command is input, the user input was input during operation, the script is written as follows:
    Here Insert Picture Description

Guess you like

Origin blog.csdn.net/weixin_45069175/article/details/92075487