title: When making a very simple multiple choice story in Python, can I call a line to repeat if neither of the options are selected?
body: <pre><code>  d1a = input (&quot;Do you want to: A) Approach the house. B) Approach the stable. [A/B]? : &quot;)
          if d1a == &quot;A&quot;:
              print (&quot;You approach the cottage.&quot;)
          elif d1a == &quot;B&quot;:
              print (&quot;You approach the stables.&quot;)
          else 
  </code></pre>
  <p>I have only just started learning python and it is my first language, so I am just playing about with it. Is it possible for the else statement to ask for the input again and it to be saved as the same variable when neither A or B is typed in?</p>
  <p>EDIT:</p>
  <pre><code>import time
  import random
  import sys
  print (&quot;You wake up to find yourself in a clearing off a forest, sounded by tall&quot;)
  print (&quot; trees on all sides with a path ahead of you&quot;)
  d1 = input (&quot;Do you want to : A) Walk down the path. B)Move your way through the trees? [A/B]: &quot;)
  if d1 == &quot;A&quot;:
      print (&quot;You begin to walk down the path.&quot;)
      print (&quot; As a Sidenote, during this adventure 'dice' will be thrown and the success of your chosen action&quot;)
      print (&quot; will be determined by the result.&quot;)
      r1 = random.randint(0.0,10.0)
      if 4 &gt; r1 &gt; 0.1:
          print (&quot; Your groggyness from waking means you reach the edge of the forest after nightfall.&quot;)
          print (&quot; You see that the path continues towards a small cottage, the lights are out and no smoke rises from the chimney.&quot;)
          print (&quot; Away from the cottage is a stable, where you can see a horse standing with its head outside the door&quot;)
          d1a = input (&quot;Do you want to: A) Approach the house. B) Approach the stable. [A/B]? : &quot;)
          if d1a == &quot;A&quot;:
              print (&quot;You approach the cottage.&quot;)
          elif d1a == &quot;B&quot;:
               print (&quot;You approach the stables.&quot;)
          else :
  </code></pre>