title: Creating a Confirmation function in python
body: <pre><code>def confirm_choice():
      confirm = input("[c]Confirm or [v]Void: ")
      if confirm != 'c' and confirm != 'v':
          print("\n Invalid Option. Please Enter a Valid Option.")
          confirm_choice() 
      print (confirm)
      return confirm
  </code></pre>
  
  <p>When an invalid input has been keyed in for example, the letter 'k' followed by a valid input 'c', the function would print both inputs 'c' and 'k'</p>
  
  <p>Output:</p>
  
  <pre><code>c
  k
  </code></pre>
  
  <p>How can the above program be altered so that it returns only either 'c' or 'v'and  repeats the function if the input is invalid. </p>