I have this code in python.
import sys list1 = [\"A\", \"B\", \"C\"] list2 = [1, 2, 3] myarg = sys.argv[1] print len(myarg)
I will run thi
You shouldn't, but if you really want/have to do this, you can use globals():
globals()
print len(globals()[myarg])
First make sure myarg is the name of a declared variable: if myarg in globals(): ...
myarg
if myarg in globals(): ...