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