convert string to list

Jochen Hub jhub at
Wed Oct 13 14:03:26 CEST 2004


I am a real beginner in Python and I was wondering if there is a way to 
convert a string (which contains a list) to a "real" list.

I need this since I would like to give a list as an argument to my 
Python script from the bash:

import sys
argument1 = sys.argv[1]
thelist = ???(argument1)

and then call the script from the bash like this ["A","B","C"]

Thanks you,

More information about the Python-list mailing list