Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| lehrkraefte:blc:informatik:glf25:labyrinthe:wegfindung [2026/03/17 08:55] – [Dictionary nach Markierungen] Ivo Blöchliger | lehrkraefte:blc:informatik:glf25:labyrinthe:wegfindung [2026/03/17 08:58] (current) – [Dictionary nach Markierungen] Ivo Blöchliger | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| # aktuelle Position = Startposition | # aktuelle Position = Startposition | ||
| # Wiederhole: | # Wiederhole: | ||
| - | # Alle Nachbarfelder betrachten | + | # Alle Nachbarfelder |
| # wenn ein Nachbar mit ' | # wenn ein Nachbar mit ' | ||
| # | # | ||
| Line 77: | Line 77: | ||
| nachbarn[nb.mark] = [nb] # Sonst neue Liste mit einem Eintrag | nachbarn[nb.mark] = [nb] # Sonst neue Liste mit einem Eintrag | ||
| | | ||
| + | </ | ||
| + | ==== Testen, ob ein Dictionary einen Schlüssel hat ==== | ||
| + | <code python> | ||
| + | d = {" | ||
| + | if " | ||
| + | | ||
| + | if not " | ||
| + | | ||
| </ | </ | ||