Fill: List Append
Fill in the Blank Beginner
Question
Fill in the blank to add 4 to the end of the list.
Code
nums = [1, 2, 3]
nums.___(4)
Hint
The method that adds a single element to the end is called...
Explanation
append() adds a single element to the end of a list. After nums.append(4), nums is [1, 2, 3, 4].
Related Resources
Related Lessons
- Lists
List methods.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.