Neural Sync Active
Week 6: List Methods and Mutation
Registry Synced
Week 6: List Methods and Mutation
223 words
1 min read
Course: Jan 2026 - Python Focus: How list methods behave, what they return, and when they fail.
1. Core idea
Week 6 is mostly about list method contracts: what mutates the list, what returns a value, and what raises an error.
What to remember
append()mutates in place and returnsNone.extend()expects an iterable.- Slicing returns a new list.
index()returns an integer position.remove()mutates in place and returnsNone.pop()returns the removed element.
2. Common traps
- A method returning
Nonedoes not mean it did nothing. l.extend((5))is wrong because(5)is just an integer in parentheses, not a tuple.- Missing items can raise exceptions.
- Do not confuse "type of result" with "effect on the list."
3. Speedrun pattern
When you see a Week 6 question, ask:
- Does this method mutate the list?
- Does it return a new value,
None, or an error? - Is the question about a present item or a missing one?
4. Micro revision
- Mutation:
append,extend,remove,sort - Value-returning:
pop,index - Copy-producing: slicing
Assignment anchor
Navigation
- Previous: Week 5 Notes
- Next: Week 7 Notes