I was wondering how coul i execute a function in python with just a call of an argument when running that command, for example,
parser = argparse.ArgumentParser(description="Database accounts manager")
parser.add_argument("-s", "--show", help="Shows all database rows and columns", dest="show",required=False)
args = parser.parse_args()
if args.show:
print("i am beautiful")
what i would like is to when i call this file : python file.py -s or python file.py --show, i would like it to execute a function like i wrote for an example : "print("i am beautiful")
because when i do that i need to give an argument so it executes the function: "print(...)"