HELP ME!
crazyCoder691 (6)

I have this list

ai_options["attack, heal"]
abcd = random.choice(AI_options)
print("The chosen was: {}".format(abcd))

This works fine and prints one of the options but what I want it to do is this:

import random
ai_options["attack, heal"]
abcd = random.choice(AI_options)
if attack is chosen:
    do this
elif heal is chosen:
    do this other thing

Does anybody have any solutions?? Solved By @Highwayman
answer:

import random
ai_options["attack, heal"]
abcd = random.choice(AI_options)
if abcd == "attack" :
  do this
elif abcd == "heal" :
  do this other thing
You are viewing a single comment. View All
Answered by Highwayman (1250) [earned 5 cycles]
View Answer
crazyCoder691 (6)

Thanks @Highwayman this really worked!