rows = 10 number = 0 for i in range(10): output = "" for j in range(10): output += str(i * 10 + j + 1) output += " " print(output)