When using the 'in' operator to search for an item in a list e.g.
if item in list: print item
What algorithm is used to search for this item. Is it a straight search of the list from beginning to end or does it use something like binary search?
When using the 'in' operator to search for an item in a list e.g.
if item in list: print item
What algorithm is used to search for this item. Is it a straight search of the list from beginning to end or does it use something like binary search?