Cooking with Python: Seven Tasty Recipes for Programmers
Hits: 359
Description: Simple Tests Using Exceptions:Usually Python is straightforward, but there are a few unexpected exceptions.Credits: Robin Parma.Problem:You want to know if the contents of a string represent an integer, which is not quite the same thing as checking whether the string contains only digits.