我想让打印语句之间的间距相同。我认为间距是一样的,但是在第三行和第四行文本之间存在更大的差距。
这是我的代码
import random
import time
def UserInfo():
UserName = input ("Player 1 what is your name?\n")
return UserName
def Introduction(UserName):
time.sleep(.5)
print ("Hello " + UserName + ",\n")
time.sleep(1)
print ("You are an unfortunate soul\n")
UserName = UserInfo()
Introduction(UserName)
我得到的结果是
Player 1 what is your name?
Patrick
Hello Patrick,
You are an unfortunate soul
但我不想要第三行和第四行之间的差距