QUESTION 2 OF 15

Can a tuple contain mutable objects?

Reveal the answer and explore the explanation.

02
EasyCore

Can a tuple contain mutable objects?

Answer
Answer

Immutable ordered collection; contained objects may still be mutable.

Practical example

Use a pair of coordinates as a dictionary key when its contents are hashable.

Reference: Further reading ↗

Last 30 min revisionHigh-yield interview Q&As