Yup. My bad. That should have read "type hints" or "type annotations".
Given that the title says "Lists and Tuples" and you didn't mention tuples yet,
- lists are usually used to hold "zero or more of a repeating type of data" where the exact code doesn't matter much, eg a list of students. The exact number of students shouldn't matter a whole lot. The order often doesn't matter much, either.
- tuples are usually used to hold an exact number of entries, eg
(x, y) coordinates or (r, g, b) colors where you expect exactly n values and the position of the value means something. Usually swapping orders in a tuple will break something, as will having an unexpected number of elements.
Given that lists are "zero or more of thing X", you get list[X]. Tuples are "exactly X, Y, Z" so the type annotation is tuple[X, Y, Z] which might be tuple[int, int] or tuple[int, str, str] etc.