The instructions seems pretty straight forward to me. And yet my current solution is giving me an answer that is too low. Am I misunderstanding the instructions? Or is there a logical error in my code here:
with open("sample") as f:
fresh, shelf = f.read().split("\n\n")
shelf = {int(num) for num in shelf.splitlines()}
fresh = {int(l): int(r) for l, r in [
line.split("-") for line in fresh.splitlines()
]}
total = 0
for item in shelf:
for l, r in fresh.items():
if l <= item <= r:
total += 1
break
print(total)





![nice lil screengrab i thought could make for a good wallpaper :) [from episode 10 at around 7:40]](https://i.redd.it/220ftv8no87d1.png)

