1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Python for Finance

Exercise

Exploring list methods and functions

Lists methods and functions are useful for analyses. Functions take objects as inputs or are "passed" an object. Methods, in contrast, act on objects. For lists, useful functions include max() and min(), which identify the maximum or minimum value in a list. A useful list method is .sort() which sorts the elements in a list.

Instructions 1/2

undefined XP
    1
    2

Using the method .sort(), sort and print the prices in the list prices.