in operation in Python

In python in operator can be used to check if a value is present in list or tuple. in operator performs caSe sEnSitiVe search.

Example : Check if value exists in list.
cars = ["Audi", "Tesla", "BMW"]
"Tesla" in cars
"tesla" in cars

True
False


Example 2: Usage with tuple
cars = ("Audi", "Tesla", "BMW")
"Tesla" in cars

True