You are viewing a single comment's thread. Return to all comments →
Slightly better solution uses python 3 f-strings, they're more efficient:
def staircase(n): for i in range(1, n + 1): print(f'{" " * n - i}{"#" * i}') n = int(input()) staircase(n)
Staircase
You are viewing a single comment's thread. Return to all comments →
Slightly better solution uses python 3 f-strings, they're more efficient: