Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Using Python's min() and max() (Summary)

Now you know how to use Python’s built-in min() and max() functions to find the smallest and largest values in an iterable or in a series of two or more regular arguments. You also learned about a few other characteristics of min() and max() that can make them useful in your day-to-day programming.

In this video course, you learned how to:

  • Find the smallest and largest values using Python’s min() and max(), respectively
  • Call min() and max() with a single iterable and with several regular arguments
  • Use min() and max() with strings and dictionaries
  • Customize the behavior of min() and max() with key and default
  • Feed comprehensions and generator expressions into min() and max()

Additionally, you’ve coded a handful of practical examples using min() and max() to approach real-world problems that you might run into while coding. You’ve also a written custom version of min() and max() in pure Python, a nice learning exercise that helped you understand the logic behind these built-in functions.

Check out these resources to continue your learning:

Download

Sample Code (.zip)

914 bytes
Download

Course Slides (.pdf)

5.9 MB

Become a Member to join the conversation.