[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
this:
s='hello, world!'
s=int(s)

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

ä-ö-ü-ß-Ä-Ö-Ü


More information about the Tutor mailing list