[Tutor] Reformatting phone number

Dotan Cohen dotancohen at gmail.com
Thu Aug 21 00:38:31 CEST 2008

2008/8/21 Robert Berman <bermanrl at embarqmail.com>:
> Not directly as in C, but, for example, if you have s='3' and you want s
> used as an integer, you can say s=int(s) and it is an integer. Conversely,
> if you have a question about the type, you could also say type(s) which,
> depending, will return, 'str','int', etc.
> Hope this helps a bit.

It does help, and I will make a point of familiarizing myself with the
errors reported by runtime errors (is this a valid term in Python, as
there are no compile errors) such as those generated from code like
s='hello, world!'

Dotan Cohen



More information about the Tutor mailing list