Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is a list in Python?
Think about collecting items together.
How do you access the first item in a list?
Remember, indexing starts at zero!
What do you call an ordered collection of values in Python?
It's used to store items in a specific sequence.
True or False: Lists in Python are immutable.
Think about whether you can change items in a list.
Create a list of 10 random numbers and sort it in descending order. Show the original and sorted lists.
Use the `sorted()` function with the reverse parameter set to True.
Design a program that lets a user build their shopping list. The user can add items, remove specific items, and print the final list.
You'll be using loops and conditionals to handle user input effectively.
5 more questions in this section. Enroll free to practise them all.
Enroll free