Advertisement
icarussiano

Untitled

Dec 4th, 2022
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. Part 1 one-line
  2. 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