← All topics
Quiz: References and Copying: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does this print? (code)
- Q2. What does this print? (code)
- Q3. What does this print? (code)
- Q4. When should you use is instead of ==?
- Q5. Which of these types is mutable?
- Q6. A function does items = [] on its parameter. What does the caller's list look like afterwards?
- Q7. Why does grid = [[0] 3] 3 cause problems?
- Q8. Which call copies a nested list so that no inner list is shared?
- Q9. What does this print? (code)
- Q10. Which statement about a shallow copy of a list is true?