Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import fileinput
- import re
- strings = []
- for s in fileinput.input():
- if len(s) == 1: break
- strings.append(s.strip())
- for string in strings:
- result = re.findall(r'cat', string)
- if (len(result) >= 2): print (string)
- import re
- strings=[]
- i = True
- while i:
- i = input()
- if i: strings.append(i)
- for string in strings:
- result = re.findall(r'cat', string)
- if (len(result) >= 2): print (string)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement