Passing the argument as:
python3 my_script.py red
In script, use variable as:
# my_script.py
import sys
colour = sys.argv[1]
if colour == 'red':
Passing the argument as:
python3 my_script.py red
In script, use variable as:
# my_script.py
import sys
colour = sys.argv[1]
if colour == 'red':