from sys import argv script, first, second, third = argv print "The script is called:", scriptprint "Your first variable is:", firstprint "Your second variable is:", secondprint "Your third variable is:", third Result:
$ python ex13.py first 2nd 3rd The script is called: ex13.py
Your first variable is: first
Your second variable is: 2nd
Your third variable is: 3rd
时间: 2024-10-27 04:10:10