Menu

Arrays (Lists) - Code Quiz

1. What does the following code return?

numbers = [1, 2, 3] numbers.append(4) print(numbers[-1])
4
[1, 2, 3, 4]
1
3

2. After executing the following code, what is printed?

numbers = [5, 3, 1, 2] numbers.sort() print(numbers[0])
[1, 2, 3, 5]
1
2
5

Log in or sign-up to access the quiz



Don't have a login?

You can still revise this topic