[Tutor] Reformatting phone number

Dotan Cohen dotancohen at gmail.com
Wed Aug 20 22:58:28 CEST 2008


I was missing the quotes in the if statement. Changing
if preNumber[0] == 0:
to
if preNumber[0] == "0":
fixed the problem.

Why did I need those quotes? The 0 is numerical, so it should not need
the quotes, no?

-- 
Dotan Cohen

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

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


More information about the Tutor mailing list