title: Python 2.7.8: printing color/value with out the format
body: <p>I'm new to python and about a month into learning. I came across an issue where when I run this code it's supposed to print out the numbers in red. The second example shows what it really prints out and I'm stuck. Please help.</p>
  
  <p>It's supposed to print <code>('Enemy HP:', 1150/1200)</code><br>
  but it actually prints <code>('Enemy HP:', '\x1b[91m1150/1200\x1b[0m\n')</code></p>
  
  <pre><code>import random
  
  class bcolors:
      HEADER = '\033[95m'
      OKBLUE = "\x1b[94m"
      OKGREEN = "\x1b[92m"
      WARNING = '\033[93m'
      FAIL = '\x1b[91m'
      ENDC = '\033[0m'
      BOLD = '\033[1m'
      UNDERLINE = '\033[4m'
  
  
  class Person:
      def __init__(self, hp, mp, atk, df, magic):
          self.maxhp = hp
          self.hp = hp
          self.maxmp = mp
          self.mp = mp
          self.atkl = atk - 10
          self.atkh = atk + 10
          self.df = df
          self.magic = magic
          self.actions = ["Attack", "Magic"]
  
      def generate_damage(self):
          return random.randrange(self.atkl, self.atkh)
  
      def generate_spell_damage(self, i):
          mgl = self.magic[i]["dmg"] - 5
          mgh = self.magic[i]["dmg"] + 5
          return random.randrange(mgl, mgh)
  
      def take_damage(self, dmg):
          self.hp -= dmg
          if self.hp &lt; 0:
              self.hp = 0
          return self.hp
  
      def get_hp(self):
          return self.hp
  
      def get_max_hp(self):
          return self.maxhp
  
      def get_mp(self):
          return self.mp
  
      def get_max_mp(self):
          return self.maxmp
  
      def reduce_mp(self, cost):
          self.mp -= cost
  
      def get_spell_name(self, i):
          return self.magic[i]["name"]
  
      def get_spell_mp_cost(self, i):
          return self.magic[i]["cost"]
  
      def choose_action(self):
          i = 1
          print(bcolors.OKBLUE + bcolors.BOLD + "Actions" + bcolors.ENDC)
          for item in self.actions:
              print(str(i) + ":", item)
              i += 1
  
      def choose_magic(self):
          i = 1
          print(bcolors.OKBLUE + bcolors.BOLD + "Magic" + bcolors.ENDC)
          for spell in self.magic:
              print(str(i) + ":", spell["name"], "(cost:", str(spell["cost"]) + ")")
              i = 1
  
  
  
  from classes.game import Person, bcolors
  
  
  magic = [{"name": "Fire", "cost": 10, "dmg": 100},
           {"name": "Thunder", "cost": 10, "dmg": 124},
           {"name": "Blizzard", "cost": 10, "dmg": 100}]
  
  
  player = Person(460, 65, 60, 34, magic)
  enemy = Person(1200, 65, 45, 25, magic)
  
  running = True
  i = 0
  
  print(bcolors.FAIL + bcolors.BOLD + "AN ENEMY ATTACKS!" + bcolors.ENDC)
  
  while running:
      print("======================")
      player.choose_action()
      choice = input("Choose action:")
      index = int(choice) - 1
  
      if index == 0:
          dmg = player.generate_damage()
          enemy.take_damage(dmg)
          print("You attacked for", dmg, "points of damage.")
      elif index == 1:
          player.choose_magic()
          magic_choice = int(input("Choose magic:")) - 1
          magic_dmg = player.generate_spell_damage(magic_choice)
          spell = player.get_spell_name(magic_choice)
          cost = player.get_spell_mp_cost(magic_choice)
  
          current_mp = player.get_mp()
  
          if cost &gt; current_mp:
              print(bcolors.FAIL + "\nNot enough MP\n" + bcolors.ENDC)
              continue
  
          player.reduce_mp(cost)
          enemy.take_damage(magic_dmg)
          print(bcolors.OKBLUE + "\n" + spell + " deals", str(magic_dmg), "points of damage" + bcolors.ENDC)
  
  
      enemy_choice = 1
  
      enemy_dmg = enemy.generate_damage()
      player.take_damage(enemy_dmg)
      print("Enemy attacks for", enemy_dmg)
  
      print("----------------------------")
      print("Enemy HP:", bcolors.FAIL + str(enemy.get_hp()) + "/" + str(enemy.get_max_hp()) + bcolors.ENDC + "\n")
  
      print("Your HP:", bcolors.OKGREEN + str(player.get_hp()) + "/" + str(player.get_max_hp()) + bcolors.ENDC)
      print("Your MP:", bcolors.OKBLUE + str(player.get_mp()) + "/" + str(player.get_max_mp()) + bcolors.ENDC + "\n")
  
  
  
      if enemy.get_hp() == 0:
          print(bcolors.OKGREEN + "You Win!", + bcolors.ENDC)
          running = False
      elif player.get_hp() == 0:
          print(bcolors.FAIL + "Your enemy has defeated you!" + bcolors.ENDC)
          running = False
  </code></pre>