输入前留空的空行

时间:2017-12-24 20:36:46

标签: python-3.x

我试图让我的输出看起来像这样:

You have 6 guesses left. 
Available letters: abcdefghijklmnopqrstuvwxyz
Please guess a letter:  ​ a  
Good guess: _ a_ _ 

但是我看起来像这样:

You have 1 guesses left
Available Letters:  bcdfghjklmnopqruvwxyz

Please guess a letter: m
That letter in not in my word: _ i_ _ s

当我使用这样的输入语句时,Python 3.X正在做的是在上面加一个空行:

user_guess = input('Please guess a letter: ')

无论如何要摆脱那条空白线?

0 个答案:

没有答案