Adding double linked list implementation in python