How to read a single character from the user?

后端 未结 23 2717
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-21 04:28

Is there a way of reading one single character from the user input? For instance, they press one key at the terminal and it is returned (sort of like getch()).

23条回答
  •  忘了有多久
    2020-11-21 05:05

    if you just want to hold the screen so you can see the result on the terminal just write

    input()
    

    at the end of the code and it will hold the screen

提交回复
热议问题