The max function called on a list returns the largest element in the list. The min function called on a list returns the smallest element in the list. The max and min functions work for lists as long as elements within the list are comparable.
The sum function called on a list of numbers returns the sum of all elements in the list.
Copying a list
The copy method is used to create a copy of a list.
Adapted from Introduction to Python Programming by OpenStax (openstax.org), licensed under CC BY-NC-SA 4.0. Changes were made. License: CC-BY-NC-SA-4.0.
These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.