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