The price of dot

Here are a few different ways to do the same thing. x = [1, 2, 3, 4] # Option 1 x[0] # Option 2 x.__getitem__(0) # Option 3 from operator import getitem getitem(x, 0) # Option 4 import operator operator.getitem(x, 0) Functionally, they are meant to be equivalent to …