title: Returning to menu after command? Python
body: <p>I know all my questions are really easy but I'm a beginner so here it is...
  I have been developing the guessing number thing after everyones help, but I want to then return to a menu which has just been left. Here's the code:</p>
  
  <pre><code>import time
  import random
  animalmenu()
  
  def animalmenu():
      print()
      print()
      print()
      print()
      print('Welcome to the menu. I am thinking of a menu. Select the option\'s below to       try and guess my animal.')
      print()
      print('a) No. of Legs')
      print('b) Type of animal')
      print('c) Preffered Climate')
      print('d) Size')
      print('e) Colour')
      print('f) Diet')
      print('g) Habitat')
      print('h) Can be kept as pet')
      print('i) Guess animal')
      print()
      print('When in a menu, type in \'555\' to return here')
      AniChoice = input('Choose your option: ')
      if AniChoice == 'a':
          loop = 10
          while loop == 10:
              print()
              print('')
              print()
              guessleg = int(input('Guess the number of legs: '))
              if leg == guessleg:
                  print('True')
              elif leg != guessleg:
                  print('False')
               print('r = Return to menu, g = guess again.')
               rg = input()
               if rg == 'g':
                   print('Loading...')
               elif rg == 'r':
                   loop = 0
                   time.sleep(1)
                   print('Returning to menu...')
                   time.sleep(1)
                   animalmenu()
  </code></pre>
  
  <p>everytime I run it, I type in a number as the code asks but then, instead of asking if I want to return to the menu it just asks the question again and again, 'Guess the number of legs: '. I know this is something to do with my looping method but I do not understand and because of the integer setting I cannot just make another if, like so:</p>
  
  <pre><code>            guessleg = int(input('Guess the number of legs: '))
              if leg == guessleg:
                  print('True')
              elif leg != guessleg:
                  print('False')
              elif guessleg == 'back':
                      loop = 0                    
                  animalmenu()
  </code></pre>
  
  <p>And I do not see any other way of doing it as neither way seems to work? How would you suggest returning to animalmenu()?</p>