python list of different types code example
Example 1: python list and list
a = ['apple', 'banana', 'pear']
b = ['fridge', 'stove', 'banana']
a & b == ['banana'] #True
Example 2: lists in python
[0,'',True,5.2,False,[1,2]]
a = ['apple', 'banana', 'pear']
b = ['fridge', 'stove', 'banana']
a & b == ['banana'] #True
[0,'',True,5.2,False,[1,2]]