The output for my string list is a node object instead of a normal output like [1,2,3], how do i fix this?
class Node:
def __init__(self, item, link):
self.item = item
self.next = link
def __str__(self):
string = []
item = self.top
while item is not None:
string.append(str(item))
item = item.next
return str(string)