1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 for i in range(10): # Print leading spaces for j in range(10 - i): print(" ", end=" ") # Count up for j in range(1, i + 1): print(j, end=" ") # Count down for j in range(i - 1, 0, -1): print(j, end=" ") # Next row print() for i in range(10): # Print leading spaces for j in range(i + 2): print(" ", end=" ") # Count down for j in range(1, 9 - i): print(j, end=" ") # Next row print()