This commit is contained in:
alstergym
2026-09-21 15:51:40 +02:00
parent 3e3227e92a
commit 75320f21e4
+14 -8
View File
@@ -1,12 +1,18 @@
from knoten import Knoten from knoten import Knoten
k1=Knoten(1) class Liste:
print(k1.data) def __init__(self):
k2=Knoten(2) self.head = None
print(k2.data)
k1.next=k2 def ausgebenListe(self):
print("--")
print(k1.next.data) aktueller_knoten = self.head
print(k2.data)
while aktueller_knoten is not None:
print(aktueller_knoten.data)
aktueller_knoten = aktueller_knoten.next
def append(self,data):
h=1