On 30/08/2021 15:50, Chris Angelico wrote:
def how_many_times(): return next((count, rolls) for count, rolls in enumerate(iter(roll, None)) if len(Counter(rolls)) == 1)
That's certainly the most Counter-intuitive version so far;)
Do I get bonus points for it being a one-liner that doesn't fit in eighty characters?
Nah, but you'll get an honorable mention when you run it through pycodestyle without line break...
-- https://mail.python.org/mailman/listinfo/python-list