- Example # Check if the string DOES NOT contain any digits ( number from 0-9)
txt = "The rain in Spain"
x = re.findall("\D", txt)
print (x)
if x:
print("Yes, there is at least one match!")
else:
print("No match")
- Result['T', 'h', 'e', ' ', 'r', 'a', 'i', 'n', ' ', 'i', 'n', ' ', 'S', 'p', 'a', 'i', 'n']
Yes, there is at least one match!