eq

returns an element at the specified index.

Arguments

Source


def eq(self, index):
    if (0 <= index and index < len(self)) or \
           (index < 0 and abs(index) <= len(self)):
            return self[index]
    return None