demo_regex_seq6.py:
import re str = "The rain in Spain" #Return a match at every white-space character: x = re.findall("\s", str) print(x) if (x): print("Yes, there is at least one match!") else: print("No match")
➜ begtut>python demo_regex_seq6.py
[' ', ' ', ' ']
Yes, there is at least one match!