#2 most askedVery commonEasyData types & mutability
List vs tuple
๐ข Asked in real interviews
No reports yet. Were you asked this? Be the first to say where.What's the difference between a list and a tuple? When would you use each?
๐ฎ Predict the output
point = (3, 4)
visits = {point: "home"}
try:
point[0] = 9
except TypeError:
print("tuples can't change")
print(visits[(3, 4)])
๐ค Answer it out loud, then check yourself
Say your answer as if the interviewer is listening (30โ90 seconds). Then reveal what a strong answer covers and tick what you said.
Answer out loud first, then compare.
Want to rehearse it?Answer this to the AI interviewer and get a verdict โ