Detect key input in Python

前端 未结 4 1218
有刺的猬
有刺的猬 2020-12-08 06:10

(In 2013) I don\'t know why Python is that weird, you can\'t find this by searching in google very easily, but it\'s quite simple.

How can I detect \'SPACE\

4条回答
  •  猫巷女王i
    2020-12-08 06:19

    use the builtin: (no need for tkinter)

    s = input('->>')
    print(s) # what you just typed); now use if's 
    

提交回复
热议问题