title: How do I get a Different Random Choice When People Decided to Play Again? Python
body: <p>I'm basically trying to get a different enemy every single time that people play/runs the code. For now, If I decided to play again the code keeps using the same values as before and I really want them to be different. Please help me. I'm New to using Python!</p>
  <p>I left you the whole code of the program in case It helps you to help me. Thanks! I hope I will help others soon.</p>
  <pre class="lang-py prettyprint-override"><code>import time
  import random
  items = []
  enemy = random.choice([&quot;Troll&quot;, &quot;Pirate&quot;, &quot;Gorgon&quot;, &quot;Monster&quot;])
  weapons = random.choice([&quot;Bow&quot;, &quot;Axe&quot;, &quot;Bazooka&quot;, &quot;Sword&quot;])
  
  
  def print_pause(message_to_print):
      print(message_to_print)
      time.sleep(1)
  
  
  def intro():
      print_pause(&quot;You find yourself standing in an open field, &quot;
                  &quot;filled with grass and yellow wildflowers.&quot;)
      print_pause(f&quot;Rumor has it that a {enemy} is somewhere around here, and &quot;
                  &quot;has been terrifying the nearby village.&quot;)
  
  
  def choice():
      while True:
          choice = input(&quot;Enter 1 to knock on the door of the house.\n&quot;
                         &quot;Enter 2 to peer into the cave.\n&quot;
                         &quot;What would you like to do?\n&quot;
                         &quot;Please enter 1 or 2.\n&quot;)
          if choice == '1':
              house()
          elif choice == '2':
              cave()
          else:
              print(&quot;Please enter 1 or 2.\n&quot;)
  
  
  def fight():
      print_pause(f&quot;The {enemy} attacks you!&quot;)
      fight = input(&quot;Would you like to (1) fight or (2) run away?\n&quot;)
      if fight == '1':
          if ({weapons}) in items:
              print_pause(f&quot;As the {enemy} moves to attack, you unsheath &quot;
                          f&quot;your new {weapons}.&quot;)
              print_pause(f&quot;The {weapons} of Ogoroth shines brightly in your &quot;
                          &quot;hand as you brace yourself for the attack.&quot;)
              print_pause(f&quot;But the {enemy} takes one look at your shiny new &quot;
                          &quot;toy and runs away!&quot;)
              print_pause(f&quot;You have rid the town of the {enemy}. &quot;
                          &quot;You are victorious!&quot;)
              play_again()
          else:
              print_pause(f&quot;You feel a bit under-prepared for this, &quot;
                          &quot;what with only having a tiny dagger.&quot;)
              print_pause(f&quot;You do your best...&quot;)
              print_pause(f&quot;but your dagger is no match for the {enemy}.&quot;)
              print_pause(f&quot;You have been defeated!&quot;)
              print_pause(f&quot;G A M E   O V E R&quot;)
              play_again()
  
      elif fight == '2':
          print_pause(&quot;You run back into the field. Luckily, &quot;
                      &quot;you don't seem to have been followed.&quot;)
          choice()
  
  
  def house():
      print_pause(&quot;You approach the door of the house.&quot;)
      print_pause(f&quot;You are about to knock when the door &quot;
                  f&quot;opens and out steps a {enemy}.&quot;)
      print_pause(f&quot;Eep! This is the {enemy} house!&quot;)
      fight()
  
  
  def cave():
      if ({weapons}) in items:
          print_pause(&quot;You've been here before, and gotten all &quot;
                      &quot;the good stuff. It's just an empty cave now.&quot;)
          print_pause(&quot;You walk back out to the field.&quot;)
  
      else:
          print_pause(f&quot;You peer cautiously into the cave.&quot;)
          print_pause(f&quot;It turns out to be only a very small cave.&quot;)
          print_pause(f&quot;Your eye catches a glint of metal behind a rock.&quot;)
          print_pause(f&quot;You have found the magical {weapons} of Ogoroth!&quot;)
          print_pause(f&quot;You discard your silly old dagger and take &quot;
                      f&quot;the {weapons} with you.&quot;)
          print_pause(f&quot;You walk back out to the field.&quot;)
          items.append({weapons})
      choice()
  
  
  def play_again():
      while True:
          choice = input(&quot;Play again? [y|n]\n&quot;)
          if choice == 'y':
              play_game()
          elif choice == 'n':
              print('Thanks for playing! Goodbye!')
              exit(0)
          else:
              print(&quot;(Please enter y or n.&quot;)
  
  
  def play_game():
      intro()
      choice()
  
  play_game()
  </code></pre>