About getopt.need help

 opts, args = getopt.getopt(sys.argv[1:],"hle:t:p:cu:",

while using like above code,is using argv in place of sys.argv[1:] same or when to use it.then hle is written together and others written separately.is there a reason for that or can be written like h:l:e:t:p:c:u.

is argparse,getopt and optparse same.which do you think is better

No sys.argv[] would include the name of your script. sys.argv[1:] is saying “everything from index 1 to the end”.