On Tue, Aug 31, 2021 at 12:28 AM Peter Otten <__pete...@web.de> wrote: > > 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;)
Thank you, I appreciate that :) > > 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... > Are there any linters that warn against "unintuitive use of two-argument iter()"? ChrisA -- https://mail.python.org/mailman/listinfo/python-list