1. Học hỏi
  2. /
  3. Khoa Học
  4. /
  5. Introduction to Python for Finance

Connected

Bài tập

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.

Hướng dẫn 1/2

undefined XP
    1
    2

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