How to convert a string to a list?
posted by web10 on 2009-06-22 00:00:00
s="1,2,3,5,6,7,8,9"

12
Sure!split() function returns a list of the words in the string, using "," (comma) as the delimiter string.
s="1,2,3,5,6,7,8,9" my_list=s.split(",") print my_list
Answer the question
Top Users
- dail (12)
- livin52 (3)
- camu (3)
- softweb (2)
- Nadine (1)
- Josware (1)
- lfelipecr (1)
- gregoriohc (1)
- Mitu (1)
- ryan714 (1)