List Functions

Built-in functions
Get the number of elements in a list
len(your_list)
Find the sum of a list
sum(your_list)
Find the minimum value of a list
min(your_list)
Find the maximum value of a list
max(your_list)
Random library methods
Choose a random element from a list
import random
random.choice(your_list)
Shuffle a list
import random
random.shuffle(your_list)
List methods
Sort a list
your_list.sort()
Reverse a list
your_list.reverse()
Remove all elements from a list
your_list.clear()

Exercise 1 of 5

Print the number of elements in the list.
numbers = [4, 0, 8, 3, 1, 2, 6, 9, 7, 5]

Your code

Exercise 2 of 5

Print the sum of the numbers in the list.
numbers = [4, 0, 8, 3, 1, 2, 6, 9, 7, 5]

Your code

Exercise 3 of 5

Print the minimum value in the list.
numbers = [4, 0, 8, 3, 1, 2, 6, 9, 7, 5]

Your code

Exercise 4 of 5

Print the maximum value in the list.
numbers = [4, 0, 8, 3, 1, 2, 6, 9, 7, 5]

Your code

Exercise 5 of 5

Print a random number from the list.
import random
numbers = [4, 0, 8, 3, 1, 2, 6, 9, 7, 5]

Your code