#try to avoid input function a = int(input("Enter Number of rows :")) b = c = 1 for i in range(1,a+1): con = "" for j in range(i): con = con+" "+str(c) c = c-1 b = b+i+1 c = b print(con)
Click the run button. Try to avoid input() function.