Adding doubly linked list written in python, with first version of index