def shuchu(num): for i in range(num): for j in range(i + 1): print(j + 1, end="") print("") shuchu(8)