cott wrote:
>
>
> On 30 Aug 2020, at 09:03, Jeff Allen wrote:
>
> On 29/08/2020 14:17, Barry Scott wrote:
>
> On 29 Aug 2020, at 13:42, Filipp Bakanov wrote:
>
> I'd like to propose adding argmax and argmin functions to the python list.
> These functions return t
I'd like to propose adding argmax and argmin functions to the python list.
These functions return the index of a maximum / minimum element of the
list. Eg:
a = [1, 4, 2, 3]
print(a.argmax()) # 1
print(a.argmin()) # 0
It's a very popular request (based on stackoverflow
https://stackoverflow.com/
Seems like itertools recipes already have "all_equal" function. What do you
think about moving it from recipes to itertools? I suggest a C
implementation with optimisations for builtin collections.
2016-10-06 18:42 GMT+03:00 Chris Angelico :
> On Fri, Oct 7, 2016 at 2:23 AM, Steven D'Aprano
> wr
For now there are many usefull builtin functions like "any", "all", etc.
I'd like to propose a new builtin function "equal". It should accept
iterable, and return True if all items in iterable are the same or iterable
is emty.
That's quite popular problem, there is a discussion of how to perform it