Edit 1: This article has been revised to show the differences between str.isdigit and the custom solution provided. Edit 2: The sample also supports Unicode! Often you will want to check if a string in Python is a number. This happens all the time, for example with user input, fetching data from a database (which [...]
How to Check if a String is a Number in Python with str.isdigit (and Unicode)
Read More →