Python hosting: Host, run, and code Python in the cloud!
The Python function .isnumeric() (which is part of every string) returns True if string is numeric. If the string is not numeric, it will return False.
You can use this in combination with if-statements which then allow you to branch your code. This is often used for input validation.
It does not take any parameters. The format of .isnumeric() is:
Python Programming Bootcamp: Go from zero to hero
The example below defines a string and then checks if the string is numeric. We do this twice, first with a string that is not numeric and then with a string that is numeric.
str = u"someone speak python here? sssss"