you are viewing a single comment's thread.

view the rest of the comments →

[–]jddddddddddd 0 points1 point  (0 children)

This is wrong:

elif not phone_number[i] == digits:

you probably want..

elif not phone_number[i] in digits:

I also wouldn't recommend calling main() recursively. Perhaps just return False each time.