>>> def hasNumbers(inputString):
... return any(char.isdigit() for char in inputString)
...
>>> hasNumbers("I own 1 dog")
True
>>> hasNumbers("I own no dog")
False
txt = "565543"
x = txt.isnumeric()
>>> 'A'.isdigit()
False
>>> '1'.isdigit()
True
s = "abc1"
contains_digit = any(map(str.isdigit, s))
print(contains_digit)
def containsNumber(value):
for character in value:
if character.isdigit():
return False
return True
s = set(str(4059304593))
print('2' in s)