Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

What algorithm is used when using the in operator in python to search a list?

$
0
0

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?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>