我想让它让用户输入他的姓名/年龄,然后输出十年后的姓名和年龄。我已经这样设置了:
print("Let's find out how old you will be in 10 Years.\n")
name = input("name: ")
print("\nNow enter your age,",name,"\n")
age = int(input("age: "))
ageinten = age + 10
print("\n",name,"you will be",ageinten,"in ten years.")
input("Press Enter to close")
输出是这样的:
Let's find out how old you will be in 10 Years.
name: Example
Now enter your age, Example
age: 20
Example you will be 30 in ten years.
Press Enter to close
但我希望它没有示例之前的空格:
Example you will be 30 in ten years.
Press Enter to close
任何人都可以帮助解决这个问题吗?