Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import select
- import sys
- def main():
- print("Question")
- expected = "correct"
- timeout = 10. # seconds
- readready, _, _ = select.select((sys.stdin, ), (), (), timeout)
- if readready:
- answer = input()
- print("Yes" if answer == expected else "No")
- else:
- print("Too late")
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement