python中 input()输入需要2次回车问题!求解决)
import os,time
Lord_info = {'lord_id':'','lord_name':'','lord_lv':'','lord_xp':''}
Domain_info = {'Domain_id':'','Domain_name':'','Domain_lv':'','Domain_xp':''}
#Resource = {'food':'','stone':'','wood':'','ore':''}
if Lord_info['lord_name'] == '' or Domain_info['Domain_name']== '' :
if Lord_info['lord_name'] == '':
print('还不知道您叫什么呢,请为自己取个名字把:')
Lord_info['lord_id'] = time.time()
Lord_info['lord_name'] = input()
print('holle!'+Lord_info['lord_name']+'你还没有领地,输入\'领取领地\'来获取领地吧!')
while input() != '领取领地':
print('您的指令错误哦!亲输入完整指令!')
Domain_info['Domain_name'] = input()
以上为python源码
运行过程中while里面的input输入需要敲两次回车才能继续执行!而第一次的input只需要一次回车即可!这是为啥??求解