I have gone through the sys documentation, however there is something that is still unclear to me. I have looked for some similar question on stackoverflow, but I h
sys
Other than using argparse (which I do recommend), this can be solved by slicing and expanding:
argparse
sys.exit(example(*sys.argv[1:7]))
The slice will only contain elements that actually exist, even if there aren't enough to fulfill the size of slice requested.