Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
Create a list of three vegetables in Python.
Think of vegetables you know.
Access the second item in the list fruits = ["apple", "banana", "cherry"].
Remember, indexing starts at zero.
What does the following code do? fruits.append('orange')
Think of what happens when you `append` something to a list.
True or False: Lists in Python are immutable.
Recall the definition of mutability.
Create a Python program that accepts a list of ten numbers from the user and then displays the highest and lowest numbers in the list.
Make sure to convert input from string to integer.
Build a nested list to represent a 3x3 grid, and write a function that prints the grid in a readable format.
Use a loop to go through each sub-list.
6 more questions in this section. Enroll free to practise them all.
Enroll free