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