← BYTES
Python·Starter·Ref: 6.1.9

How does a tuple differ from a list at the basic syntax level?

Have a question about this video? Mention reference 6.1.9 when you contact us.

a.Tuples use square brackets, lists use parentheses
b.They are functionally and syntactically identical
c.Tuples are written with parentheses (or just commas) and are immutable; lists use square brackets and are mutable
d.Tuples can only hold numbers
A tuple like `(1, 2, 3)` is immutable once created (you can't add/remove/reassign its elements), while a list like `[1, 2, 3]` supports in-place modification -- the syntax difference (parens vs. brackets) signals this fundamental mutability difference.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES619#Python