You are viewing a single comment's thread. Return to all comments →
Or for those who feel a semicolon in a one-liner is cheating, Python2:
print '\n'.join(('#' * (i + 1)).rjust(n) for n in [int(raw_input())] for i in xrange(n))
Python3:
[print(('#' * (i + 1)).rjust(n)) for n in (int(input()),) for i in range(n)]
Seems like cookies are disabled on this browser, please enable them to open this website
Staircase
You are viewing a single comment's thread. Return to all comments →
Or for those who feel a semicolon in a one-liner is cheating, Python2:
Python3: