In a combat system, how would I have a certain raw_input repeat until the enemy is dead?

while enemy.hp > 0:
  attack = raw_input("Which kind of attack do you want to perform against the enemy")
  enemy.hp -= damage_for(attack)

print "The enemy is dead!"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.