import sys cml = sys.argv[1] var = eval(cml) print(var, type(var)) """ Terminal> python objects_cml.py 8 8 Terminal> python objects_cml.py 8.0 8.0 Terminal> python objects_cml.py [1,2,3] [1, 2, 3] Terminal> python objects_cml.py "(1,2,3)" (1, 2, 3) Terminal> python objects_cml.py "'(1,2,3)'" (1,2,3) """