use argparse input py code example
Example 1: python argparse
import argparse
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-n", "--name", required=True, help="name of the user")
args = vars(ap.parse_args())
# display a friendly message to the user
print("Hi there {}, it's nice to meet you!".format(args["name"]))
Example 2: python argparser flags
parser.add_argument("-v", "--verbose", action="store_true",
help="verbose output")