Printing the command line arguments in reverse order : command line « Buildin Module « Python Tutorial






import sys
args = sys.argv[1:]
args.reverse() print ' '.join(args)








14.1.command line
14.1.1.The argv attribute of the sys module is a list
14.1.2.Printing the command line arguments in reverse order
14.1.3.Handling Command-Line Arguments