EasyOutput prediction
re.match anchors to the start
What does this code print?
import re s = "hello world 42" m1 = re.match(r"\d+", s) m2 = re.search(r"\d+", s) print(m1) print(m2.group())
← → arrow keys to navigate
Sign in to save your progress.
What does this code print?
import re s = "hello world 42" m1 = re.match(r"\d+", s) m2 = re.search(r"\d+", s) print(m1) print(m2.group())
← → arrow keys to navigate
Sign in to save your progress.