Getting the value for the interface and mac addr to a variable and then pass the value to the command directly secure code handling user input if the user put ; or && to execute another command it will stop by removing the shell=True single string commmand rather we remove the shell=True and exec the computer and get command in a list variable one by one which will avoid this user-input manipulation
we can give value in as a argument in a command line using sys modules or with an option with help and switch we use optparse module python macchanger.py --interface wlan0 --mac 11:aa:dd:ff:gg:hh python macchanger.py --help to print help