list in python code example
Example 1: list in python
thislist = ["apple", "banana", "cherry"]
print(thislist[1])
Example 2: python list and list
a = ['apple', 'banana', 'pear']
b = ['fridge', 'stove', 'banana']
a & b == ['banana'] #True
thislist = ["apple", "banana", "cherry"]
print(thislist[1])
a = ['apple', 'banana', 'pear']
b = ['fridge', 'stove', 'banana']
a & b == ['banana'] #True