Web Technologies - PYTHON

Back to Course

Lesson Description

Lession - #270 Python List

What is a list on Python?

The list is perhaps the most generally utilized data types in Python. Lists are utilized to store the data items where every data item is isolated by a comma (,>
. A Python List can have data types of any data type, be it a number kind(integer type>
or a boolean type.

We can see list example in below image.

Let's see an example

# list of integers
my_list1 = [1, 2, 3]

# empty list
my_list2 = []

# list with mixed data types
my_list3 = [1, "Hello", 3.4]

# nested list
my_list4 = ["mouse", [8, 4, 6], ['a']]



Try it here