About getopt

import getopt
import sys

argv = sys.argv[1:]
 opts, args = getopt.getopt(argv, 'hm:d', ['help', 'my_file='])
except getopt.GetoptError:
 #Print a message or do something useful
 print('Something went wrong!')

in the above code ```
opts, args = getopt.getopt(argv, ‘hm:d’, [‘help’, ‘my_file=’])
whats difference between hm:d and h:m:d.In some codes they use like hlp:m and some separated by colons.when to use like that


Not my area of expertise, but here is some documentation…

getopt – Command line option parsing

Hopefully someone will pipe in with an answer to your question.