From 75320f21e422289de515ee69e37f9bad826399e7 Mon Sep 17 00:00:00 2001 From: alstergym Date: Mon, 21 Sep 2026 15:51:40 +0200 Subject: [PATCH] asd --- schatzsuche/liste.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/schatzsuche/liste.py b/schatzsuche/liste.py index ae58de8..99b4cbb 100644 --- a/schatzsuche/liste.py +++ b/schatzsuche/liste.py @@ -1,12 +1,18 @@ from knoten import Knoten -k1=Knoten(1) -print(k1.data) -k2=Knoten(2) -print(k2.data) +class Liste: + def __init__(self): + self.head = None -k1.next=k2 -print("--") + def ausgebenListe(self): -print(k1.next.data) -print(k2.data) \ No newline at end of file + aktueller_knoten = self.head + + while aktueller_knoten is not None: + + print(aktueller_knoten.data) + + aktueller_knoten = aktueller_knoten.next + + def append(self,data): + h=1 \ No newline at end of file