Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Part 1 one-line
- print(len(list(filter(lambda x: int(x[0][0])<=int(x[1][0]) and int(x[0][1])>=int(x[1][1]) or (int(x[1][0])<=int(x[0][0]) and int(x[1][1])>=int(x[0][1])),[list(map(lambda x: x.split('-'),l.strip().split(','))) for l in open('input.txt')]))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement