newbe how to read in a string?

Grant Edwards grante at visi.com
Fri Mar 23 16:25:55 CET 2001


In article <99fo39$gsq$2 at news.mathworks.com>, Joshua Marshall wrote:

>> I whant to extract the 87.1. In C i would code by a
>> scanf("%s,%f,%f,%f\n"),...
>
>> How can i do this in python?
>
>I don't think there's any generic way.  It would be nice to see
>something similar to scanf in Python.

While sscanf() is handy, scanf() is considered harmful...

-- 
Grant Edwards                   grante             Yow!
                                  at               TAILFINS!!... click...
                               visi.com            



More information about the Python-list mailing list