首页 > 解决方案 > 在不按 Enter Python 3 的情况下接收用户的输入

问题描述

我想接收来自用户的输入,而不必在 python 3 中按回车键。我见过人们使用“getch”,但我需要能够在 shell 中运行它,而 getch 似乎也不起作用顺利进行。我需要的是这样的:

myVariable = raw_input() #raw input isn't in python 3, hence the problem

标签: python-3.xshellinput

解决方案


推荐阅读