Join Nostr
2025-12-03 06:21:28 UTC

Anže on Nostr: I wonder how long I'll be able to keep all the days green like this #adventofcode ...

I wonder how long I'll be able to keep all the days green like this #adventofcode 🟢

Today I learned that you can use None when slicing a list in Python:
>>> [1,2,3][:None]
[1, 2, 3]
Useful to avoid the edge case where [:0] would give an empty list:
>>> [1,2,3][:0]
[]