Question1: Lists
Use Ok to test your knowledge with the following "What Would Python Display?" questions:
python ok -q q1 -u
Predict what Python will display when you type the following into the interpreter. Then try it to check your answers.
>>> s = [7//3, 5, [4, 0, 1], 2]
>>> s[0]
______
>>> s[2]
______
>>> s[-1]
______
>>> len(s)
______
>>> 4 in s
______
>>> 4 in s[2]
______
>>> s + [3 + 2, 9]
______
>>> s[2] * 2
______
>>> x = [1, 2, 3, 4]
>>> x[1:3]
______
>>> x[:2]
______
>>> x[1:]
______
>>> x[-2:3]
______
>>> x[-2:4]
______
>>> x[0:4:2]
______
>>> x[::-1]
______