I am trying to pick a random dictionary variable from a list,
import random
emotelist = [bored]
emotechosen = random.choice(emotelist)
emotename = emotechosen['emote']
emoteframe = emotechosen['frame']
bored = {'emote':'bored', 'frame':135}
print emotename
print emoteframe
But I recieve an error of
NameError: name 'bored' is not defined
Help?
Aucun commentaire:
Enregistrer un commentaire