Data Structures

This lesson discusses the common built-in data structures of Python used for data processing.

Lists in Python #

As mentioned in the previous section, lists are a useful data structure in Python. Lists are ordered, changeable, and allow for duplicates. You create a list with the [].

We can slice a list. Slicing means to extract a part of the list. When slicing, the first number is included in the return set while the last number is not. For example:

p1 = [1,2,3,4,5,6,7,8,9,10]
p2 = p1[0:5]

The list p2 will be ...

Access this course and 1400+ top-rated courses and projects.