I want to achieve something like this, usage: main.py [-h] [--video_link video | --channel_link channel --num_vids num ] The option --num_vids is only needed if I'm using --channel_link option. I could only come with this, parser = argparse.ArgumentParser( description='A Python script to download Youtube videos') group_ = parser.add_mutually_exclusive_group() group_.add_argument('--video_link', metavar='video', type=str, help='Enter the video url') group_.add_argument('--channel_link', metavar='channel_link', type=str, help='Enter the name of the channel') args = parser.parse_args() video_link = args.video_link channel_link = args.channel_link print(video_link, channel_link) How do I implement the desired functionality? Continue reading...