Код: Выделить всё
def picture(rows, columns):
for _ in range(rows):
# Top part
print((' ' + '/\\' * columns).rstrip())
# Middle part
print((' ' + '/ \\' * columns).rstrip())
print((' ' + '\\ /' * columns).rstrip())
# Bottom part
print((' ' + '\\/' * columns).rstrip())
if rows > 1:
print((' ' + '/ \\' * columns).rstrip())
print((' ' + '\\ /' * columns).rstrip())
print((' ' + '\\/' * columns).rstrip())
picture(1,1)
picture(3,4)
Подробнее здесь: https://stackoverflow.com/questions/789 ... -in-python