String2List: odd function

Gaetan Corneau Gaetan_Corneau at baan.com
Wed Jul 21 11:24:30 EDT 1999


Isidore,

This one is easy  :)

Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> s = '[1, 2, 3, 4, 5, ["a", "b", "c"], 6, 7, 8]'
>>> s = "l = " + s
>>> exec(s)
>>> l
[1, 2, 3, 4, 5, ['a', 'b', 'c'], 6, 7, 8]
>>>

Bye,
______________________________________________________
   Gaetan Corneau
   Software Developer (System integration Team)
   BaaN  Supply Chain Solutions  
   E-mail: Gaetan_Corneau at baan.com        
   Compuserve: Gaetan_Corneau at compuserve.com  
   ICQ Number: 7395494             
   Tel: (418) 266-8252          
______________________________________________________
"Profanity is the one language all programmers know best"





More information about the Python-list mailing list