G+_Darryl Medley Posted April 18, 2014 Share Posted April 18, 2014 Professional sanitized user input demo. The best way to get validated user input is to create reusable little functions that only allow certain types of values to be entered. The key is to pass the prompt text as a parameter to the function so that you can create a wrapper around raw_input() essentially creating a specialized version of raw_input(). I've created a simple calculator program that has a both number and character entry functions as a demo: http://pastebin.com/tDb8rqEm http://pastebin.com/tDb8rqEm Link to comment Share on other sites More sharing options...
Recommended Posts