About 190,000 results
Open links in new tab
  1. How does the max() function work on list of strings in python?

    Max value element : zara Please also explain how it perform comparison on list of strings and list of numbers.

  2. python max function using 'key' and lambda expression

    Aug 18, 2013 · I come from OOP background and trying to learn python. I am using the max function which uses a lambda expression to return the instance of type Player having …

  3. python - Find the greatest (largest, maximum) number in a list of ...

    print(a.index(max_num)) Direct approach by using function max () max () function returns the item with the highest value, or the item with the highest value in an iterable Example: when you …

  4. Implementation of the max() function in Python - Stack Overflow

    Nov 17, 2021 · Your homework question got answered by one of the OG developers of the Python language itself! Kudos!

  5. How efficient is Python's max function - Stack Overflow

    Mar 28, 2011 · The function max() which returns the maximum element from a list . . . what is its running time (in Python 3) in terms of Big O notation?

  6. Getting key with maximum value in dictionary? - Stack Overflow

    Nov 6, 2008 · The dictionary method items() in Python 3 returns a view object of the dictionary. When this view object is iterated over, by the max function, it yields the dictionary items as …

  7. Creating a max function from scratch (python) - Stack Overflow

    Jul 27, 2016 · So I'm trying to create a function that determines the maximum of a set of values, from scratch. I'm not sure how to make the function change the new value of Max after a new …

  8. python - A safe max () function for empty lists - Stack Overflow

    Mar 22, 2016 · The max of an empty sequence "should" be an infinitely small thing of whatever type the elements of the sequence have. Unfortunately, (1) with an empty sequence you can't …

  9. python - Getting the index of the returned max or min item using …

    Mar 19, 2010 · 735 I'm using Python's max and min functions on lists for a minimax algorithm, and I need the index of the value returned by max() or min(). In other words, I need to know which …

  10. How to implement the Softmax function in Python? - Stack Overflow

    The softmax function is, in fact, an arg max function. That means that it does not return the largest value from the input, but the position of the largest values.