Most viewed recipes tagged "quit"http://code.activestate.com/recipes/tags/quit/views/2010-03-09T17:57:18-08:00ActiveState Code Recipesquery yes/no/quit (Python) 2010-03-09T17:57:18-08:00Trent Mickhttp://code.activestate.com/recipes/users/4173505/http://code.activestate.com/recipes/577097-query-yesnoquit/ <p style="color: grey"> Python recipe 577097 by <a href="/recipes/users/4173505/">Trent Mick</a> (<a href="/recipes/tags/ask/">ask</a>, <a href="/recipes/tags/cli/">cli</a>, <a href="/recipes/tags/no/">no</a>, <a href="/recipes/tags/query/">query</a>, <a href="/recipes/tags/quit/">quit</a>, <a href="/recipes/tags/raw_input/">raw_input</a>, <a href="/recipes/tags/yes/">yes</a>). </p> <p>Ask the user a question using raw_input() and looking something like this:</p> <pre class="prettyprint"><code>QUESTION [Y/n/q] ...validate... </code></pre> <p>See also: <a href="http://code.activestate.com/recipes/577058/">Recipe 577058</a> (query yes/no), <a href="http://code.activestate.com/recipes/577096/">Recipe 577096</a> (query custom answers), <a href="http://code.activestate.com/recipes/577098/">Recipe 577098</a> (query long), <a href="http://code.activestate.com/recipes/577099/">Recipe 577099</a> (query)</p>