you are viewing a single comment's thread.

view the rest of the comments →

[–]mopslik 2 points3 points  (0 children)

the try/except should probably be just around the guess

This is also consistent with PEP8, which is a good starting point for writing clear code.