如何在不按en键的情况下输入输入

2024-09-26 18:12:19 发布

您现在位置:Python中文网/ 问答频道 /正文

例如,我希望如此

x = int(input("Please enter your guess :")
If x = 1:
   Print ("correct")

尽管每次我需要按enter键,但我怎样才能使它在按键时显示出来。

我确实找到了getch(),尽管我无法让它工作。


Tags: inputyourif按键intprintenterplease

热门问题