Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为一个项目编写代码,但问题是它说“程序将继续接受输入,直到它被 Ctrl-D 字符终止。”。如何将快捷方式Ctrl+分配D给我的代码以终止它?
try: a = raw_input() except EOFError: print "You pressed Ctrl+D" else: print "You Entered :", a
虽然我不确定这实际上是你的问题。