What is a list?

In Python, a list is a comma-separated collection of values enclosed in square brackets and stored as a single variable. For example, ["apple","mango","banana"] is a list of strings. It can be stored as a variable just like any other data type.

Get hands-on with 1200+ tech skills courses.