Memberships in python

When we use in for seraching may be in a list or string what kind of algorithm it internally uses