Gibt es eine Bedeutung für die Eindrücke beim Aufbrechen einer Linie (unter Verwendung von Backslash oder Klammern) in P

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Gibt es eine Bedeutung für die Eindrücke beim Aufbrechen einer Linie (unter Verwendung von Backslash oder Klammern) in P

by Anonymous » 13 Feb 2025, 23:01

Gibt es eine Bedeutung für die Eindrücke beim Aufbrechen einer Linie (mit Backslash oder Klammern) in Python? Wie wäre es mit der Stilempfehlung, die empfohlen wird?

Code: Select all

def print_empty_square(size, c):
for row in range(size):
for col in range(size):
if (row == 0 or row == size -1
or col == 0 or col == size -1):
print(c,end = "")
else:
print(' ',end = "")
print()
< /code>
def print_empty_square(size, c):
for row in range(size):
for col in range(size):
if (row == 0 or row == size -1
or col == 0 or col == size -1):
print(c,end = "")
else:
print(' ',end = "")
print()
Ich habe beide Codes ausprobiert, beide rennen erfolgreich.

Top