implementation of singly linked list in python