Python list is a most versatile datatype available in Python which can be written as a list of comma-separated values (items) between square brackets. An important thing about a list is that items in a list need not be of the same type. There are four  collection data types in the Python programming language:

  1. The list is the collection that is ordered and changeable. It allows duplicate members.
  2. **A **tuple is a collection that is ordered and unchangeable. It allows duplicate members.
  3. Set is the collection which is unordered and unindexed — no duplicate members.
  4. Dictionary is the collection that is unordered, changeable, and indexed. No duplicate members.

In this example, we will talk about Python List. A list is a collection that is ordered and changeable. In Python, lists are written with square brackets.

#python #python list #programming

Python List Example: How to Use List Data Structure
3.05 GEEK