If a tuple can mix types where a string can't, why does it still support the very same indexing, slicing, and `len` you already learned on strings?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
Create a tuple whose only element is the integer 7, and assign it to single.
A one-element tuple needs a required trailing comma — otherwise Python reads the parentheses as ordinary grouping and you just get the number back.
Definition of a tuple
Write that a tuple is an indexable, ordered sequence of objects, and record the contrast with a string, whose elements are single characters of one type.
Parentheses syntax and the one-element comma
Give the forms (), (4,) and (2, 'mit', 3), and record that a = (5) has type int with value 5 while b = (4,) has type tuple.
Sequence operations shared with strings
List indexing with square brackets from index 0, + for concatenation, slicing, len, and max, min and sum, evaluating each on a tuple of your own where it applies.