array list now working with index

This commit is contained in:
mzwiessele 2014-03-26 14:59:08 +00:00
parent 81040f4566
commit ebb919bb8b

View file

@ -28,4 +28,11 @@ class ArrayList(list):
return True
return False
def index(self, item):
index = 0
for el in self:
if el is item:
return index
index += 1
raise ValueError, "{} is not in list".format(item)
pass