class Vect(object):

    def __init__(self, data):
        self.data = list(data)

def __getitem__(self, key):
    return self.data[key[0]:key[1] + 1]
a = Vect('hello')
print(a[0, 2])
Use of None in Array indexing in Python