Python sequences: The shared API of str, list, and tuple

Python is all about consistency. For example, sequences (string/list/tuple) all support:

s[i]            # get 1 item
s[start:finish] # get slice
'a' in s        # search
s.index('a')    # where is a?
s.count('a')    # how many as?
for item in s:  # iterable
    print(item)