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.
Create a list of your favorite colors using square brackets.
Remember to use square brackets.
Access the third color in your list.
Remember that indexing starts at 0.
What is the correct way to create a list in Python?
Think about the symbols used to create a list.
True or False: In Python, list indexing starts at 1.
Consider how elements are numbered in programming versus regular counting.
Create a program that manages a list of students, allowing you to add students, remove a student by name, and display the current student list. What would this look like in code?
Think about how you would use append() and remove() in your implementation.
Design a tic-tac-toe board using nested lists. Write the code to display the board and allow a player to place their mark in specified coordinates.
Consider how you’ll use two indices to navigate the nested lists.
6 more questions in this section. Enroll free to practise them all.
Enroll free