Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Python
/
Shallow and deep copy
After copy.replace(record, status="sent"), what should you assume about an unchanged muta…
from Shallow and deep copy
Python 3.14
intermediate
1 min
After copy.replace(record, status="sent"), what should you assume about an unchanged mutable field named tags?
It may still reference the same object and must be checked against the type’s replacement semantics.
It is always recursively copied.
It is converted to an immutable tuple.
The operation is invalid whenever a record has a mutable field.
Check
Ask AI about this kata
Report an error
previous kata
What does this program print?
Predict the output
next kata
Review generated work-order copier
Review AI code
A new version is available
Reload