# Lists [参考链接](https://docs.python.org/3.14/tutorial/introduction.html#lists) Python knows a number of compound data types, used to group together other values. The most versatile is the list, which can be written as a list of comma-separated values (items) between square brackets. Lists might contain items of different types, but usually the items all have the same type. ```shell >>> squares = [1, 4, 9, 16, 25] >>> squares [1, 4, 9, 16, 25] ``` Like strings (and all other built-in sequence types), lists can be indexed and sliced: