if in number python code example
Example 1: python check if number
if type(variable) == int or type(variable) == float:
isNumber = True
Example 2: if any number python
def num_there(s):
return any(i.isdigit() for i in s)
if type(variable) == int or type(variable) == float:
isNumber = True
def num_there(s):
return any(i.isdigit() for i in s)