more linkedlist solved in python