News for hackers. Stuff that matters.
Re:More Itertools by adammarples on Tuesday May 28, 2024 @06:20AM (#40499191)
Do tuple unpacking like this

result, _* = iterable()

Re:More Itertools by plyp on Tuesday May 28, 2024 @12:54PM (#40502788)
That’s not the same though. Your unpacking allows for any non-empty iterable while OPs only allows for an iterable with exactly one item or else it throws an exception.