Singly Linked List in Python
1. Node
class Node:
def __init__(self, data):
self.data = data
self.next = None
def __str__(self):
return str(self.data)
2. Singly Linked List
class SinglyLinkedList:
def __init__(self):
self.tail = None
self.head = None
self.size = 0
def append(self, data):
n = Node(data)
if self.tail:
self.tail.