[Tutor] Quick way to find the data type

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Tue Sep 27 22:53:47 CEST 2005

> >Let say I have a string. The value of the string might be 'False',
> >'True', '3', '1.394', or whatever else. Is there a quick way to convert
> >this string into the appropriate data type other than with try/except?
> eval()?

Gaaa, don't say that word!  *grin*

(Sorry, I know I'm sounding like a ranting maniac about this.  It's one of
my pet peeves.)

More information about the Tutor mailing list