Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Liste/Mehrfachliste in Python 3

Empfohlene Antworten

Veröffentlicht

Hallo zusammen!

Ich hab da ein Problem bei Python3.

Also das ganz soll ein Spielfeld werden und hier folgt nur ein Teilauszug, der Rest geht ja analog weiter: Kein Schreck ;). Das sind die Codes aus der Unicode-Zeichentabelle

#1.Line: 5 white Stone

A = ["\u251cX","\u253c","\u2500","\u253c","\u2500","\u253c","\u263a","\u253c",

"\u263a","\u253c","\u263a","\u253c","\u263a","\u253c","\u263a","\u253c","\u2500",

"\u253c","\u2500","\u253cX","\u2524A"]

#2.Line: 1 white Stone

B = ["\u251c","\u2500","\u253c","\u2500","\u253c","\u2500","\u253c","\u2500","\u253c",

"\u2500","\u253c","\u263a","\u253c","\u2500","\u253c","\u2500","\u253c","\u2500",

"\u253c","\u2500","\u253c","\u2500","\u2524B"]

#3.line: blank

C = ["\u251c","\u2500","\u253c","\u2500","\u253c","\u2500","\u253c","\u2500","\u253c",

"\u2500","\u253c","\u2500","\u253c","\u2500","\u253c","\u2500","\u253c","\u2500",

"\u253c","\u2500","\u253c","\u2500","\u2524C"]

Wenn ich jetzt, sagen wir aus Liste A, nur ein Element, zb [5], ausgeben möchte, dann gibt der zb nur ┼ aus, also ohne Gänsebeine oder sonst was. Das ist auch ok so.

ABER: Wenn ich die Komplette Liste A ausgeben will, dann kommt totaler Mist raus...

Also zb sowas wie "┼","─","─","┌", usw... das soll aber eher sowas wie ┌──┬─┐ raus kommen.

Ich möchte also alles aus der Liste einfach nur hintereinander ausgeben können und möchte trotzdem jedes Listenelement einzeln ansprechen können.

Vielen Dank im Voraus für Eure Hilfe!

Grüße,

der PhISI

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.