How to to read tuple dynamically named in command line argument (sys.argv) ?
Below example doesn’t work.
#!/usr/bin/env python
import sys
cmd1 = sys.argv[1]
tpl1 = ('one', 'two', 'three')
tpl2 = ('four', 'five', 'six')
print (cmd1)
val1 = cmd1[0]
val2 = cmd1[1]
val3 = cmd1[2]
print (val1)
print (val2)
print (val3)
current output for script.py tpl1 :
t
p
l
desired output for script.py tpl1 :
one
two
three
Please advise, thanks