I am curious to know what is faster in Python
Say I have a list
myList = ['a', 'b', 'c', 'd', 'e']
I have two ways of checking if an item is in the list.
if item in myList:
    # doSomthing()
or
for element in myList:
    if element == item:
        # doSomething()
I know that the first method is more "pythonic" but in terms of performance is there a difference?
 
    