Consider a simple string like '1.5 1e+05 test 4'
. The format used in Python 2.7 to generate that string is '%f %e %s %i'
. I want to retrieve a list of the form [1.5,100000,'test',4]
from my input string knowing the string formatter. How can I do that (Python 2.7 or Python 3)?
Thanks a lot,
Ch.