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 fruits and display it.
Use square brackets and separate by commas.
What will happen if you try to add an element to a tuple?
Remember that tuples are immutable.
Which of the following is mutable?
Consider which can be changed.
True or False: Tuples can be changed after creation.
What does it mean when we say a tuple is immutable?
Create a list containing five of your favorite movies. Then, write a function that accepts this list and returns a tuple containing the first and last movie.
Think about indexing and how to convert a list to a tuple.
Design a program that takes user input to create a list of tasks. After the user finishes creating the list, convert this list into a tuple and print both the list and the tuple.
Use a loop to gather inputs and remember to convert the list to a tuple at the end.
6 more questions in this section. Enroll free to practise them all.
Enroll free