You are viewing a single comment's thread. Return to all comments →
In one line:
[print(' '*(n-x) + '#'*(x)) for x in range(1,n+1)]
You forgot to assign n in your 'oneliner'.
Oops! Add an input() on there
Iirc it should work with the boilerplate that they give
I had something similar for Python3:
print([" "(n-i-1) + "#"*(i+1) for i in range(n)], sep='\n')