Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pprint import pprint as p
- file = open('input.txt')
- lines = list(map(list, file.readlines()))
- sep = [[]]
- for x in lines:
- if x[0] == '\n':
- sep.append([])
- sep[len(sep)-1] += (x[:-1] + [" "])
- people = []
- for x in sep:
- d = dict()
- for h in "".join(x).split():
- if h[:3] != 'cid':
- d[h[:3]] = h[4:]
- people += [d]
- count = 0
- for x in people:
- print(x, len(x))
- count += (len(x) == 7)
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement