Which of the following is a Python list? code example
Example 1: list in python
myfavouritefoods = ["Pizza", "burgers" , "chocolate"]
print(myfavouritefoods[1])
#or
print(myfavouritefoods)
Example 2: list in python
#list is data structure
#used to store different types of data at same place
list = ['this is str', 12, 12.2, True]