break input loop

Solutions on MaxInterview for break input loop by the best coders in the world

showing results for - "break input loop"
Luis
16 Jun 2018
1import sys, select
2
3print "You have ten seconds to answer!"
4
5i, o, e = select.select( [sys.stdin], [], [], 10 )
6
7if (i):
8  print "You said", sys.stdin.readline().strip()
9else:
10  print "You said nothing!"
11
similar questions
queries leading to this page
break input loop