# your code goes here
import re
asx = 'cat'
string='ffcathsvncathcatsssc'
print("findall output all result string:", re.findall(asx, string))
for i in re.finditer(asx, string):
print("finditer output match object:", i)
IyB5b3VyIGNvZGUgZ29lcyBoZXJlCmltcG9ydCByZQphc3ggPSAnY2F0JwpzdHJpbmc9J2ZmY2F0aHN2bmNhdGhjYXRzc3NjJwoKcHJpbnQoImZpbmRhbGwgb3V0cHV0IGFsbCByZXN1bHQgc3RyaW5nOiIsIHJlLmZpbmRhbGwoYXN4LCBzdHJpbmcpKQoKZm9yIGkgaW4gcmUuZmluZGl0ZXIoYXN4LCBzdHJpbmcpOgoJcHJpbnQoImZpbmRpdGVyIG91dHB1dCBtYXRjaCBvYmplY3Q6IiwgaSk=
findall output all result string: ['cat', 'cat', 'cat']
finditer output match object: <_sre.SRE_Match object; span=(2, 5), match='cat'>
finditer output match object: <_sre.SRE_Match object; span=(9, 12), match='cat'>
finditer output match object: <_sre.SRE_Match object; span=(13, 16), match='cat'>