re.findall(pattern, string, flags=0)
>>> import re >>> re.findall(r'\d+', '12 drummers, 11 pipers') ['12', '11']