About 197,000 results
Open links in new tab
  1. 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 …

  2. How does the max() function work on list of strings in python?

    How does the max () function work on list of strings in python? Asked 11 years, 10 months ago Modified 3 years, 5 months ago Viewed 54k times

  3. 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?

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

    Mar 8, 2023 · Same question was asked to me in interview, What are the ways, to find maximum number out of four numbers input by different user in python. So i explained and then wrote …

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

    Nov 17, 2021 · Implementation of the max () function in Python Asked 3 years, 10 months ago Modified 3 years, 9 months ago Viewed 8k times

  6. Which maximum does Python pick in the case of a tie?

    77 When using the max() function in Python to find the maximum value in a list (or tuple, dict etc.) and there is a tie for maximum value, which one does Python pick? Is it random?

  7. python - How to find the max object as per some custom criterion ...

    I can do max(s) to find the max of a sequence. But suppose I want to compute max according to my own function, something like: currmax = 0 def mymax(s): for i in s : #assume arity() attribute...

  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 · 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. 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 …