Home >Backend Development >Python Tutorial >python get command line parameters function
Function to get command line parameters and quantity under perl.
import sys
print sys.argv
print len(sys.argv) #Number of parameters
print sys.argv[1] #First parameter
print sys. argv[2]
For more python related articles on getting command line parameter functions, please pay attention to the PHP Chinese website!