这是一个程序,它打印第一个输入的整数值,并在同一行上每隔十分之一的值打印一个空格,直到达到最后一个值为止,在此我希望它先打印最后一个值,然后再换行。问题在于它没有在最后一个值之后打印新行。明确地说,我不希望在打印“第二个整数不能小于第一个整数”的情况下打印换行符,也不希望在输入值相等的情况下换行。仅在特殊情况下int1 感谢大家提供的任何帮助int1 = int(input())
int2 = int(input())
if int2 < int1:
print('Second integer can\'t be less than the first.')
else:
while int1 <= int2:
print(int1, end = ' ')
int1 += 10