title: Class Attributes not updating in program
body: <p>I am fairly new to coding on Python. In my code, I am trying to change the myPlayer.hp and myPlayer.sp values based on what the myPlayer.job is. But, for some reason, regardless of job, the HP and SP values are still 0 when I check them in the program. If you know how to change them, please let me know and thank you.
  Here is the code that deals with my question:</p>
  
  <pre><code>class player:
    def __init__(self):
      self.name = ''
      self.job = ''
      self.hp = 0
      self.sp = 0
      self.pwr = 0
      self.res = 0
      self.agi = 0
      self.smr = 0
      self.wll = 0
      self.status_effects = []
      self.location = 'b2'
      self.game_over = False
  myPlayer = player()
  
  def main_game_loop():
    while myPlayer.game_over is False:
      prompt()
  
  
  def setup_game():
    os.system('cls')
  
  question1 = "Hello, what's your name?\n"
  for character in question1:
      sys.stdout.write(character)
      sys.stdout.flush()
      time.sleep(0.05)
  player_name = input("&gt; ")
  myPlayer.name = player_name
  
  question2 = "Hello, what role do you want to play?\n"
  question2added = "(You can play as a warrior, mage, or priest)\n"
  for character in question2:
      sys.stdout.write(character)
      sys.stdout.flush()
      time.sleep(0.05)
  for character in question2added:
      sys.stdout.write(character)
      sys.stdout.flush()
      time.sleep(0.01)
  player_job = input("&gt; ")
  valid_jobs = ['warrior', 'mage', 'priest']
  if player_job.lower() in valid_jobs:
      myPlayer.job = player_job
      print("You are now a " + player_job + "!\n")
  while player_job.lower() not in valid_jobs:
      player_job = input("&gt; ")
      if player_job.lower() in valid_jobs:
          myPlayer.job = player_job
          print("You are now a " + player_job + "!\n")
  if myPlayer.job == 'warrior':
      myPlayer.hp = 25
      myPlayer.sp = 0
  elif myPlayer.job == 'mage':
      myPlayer.hp = 15
      myPlayer.sp = 20
  elif myPlayer.job == 'priest':
      myPlayer.hp = 20
      myPlayer.sp = 15
  </code></pre>