Hi,
I'm pretty new to programming and I'm creating a python game for my little sister.
I'm having trouble, because I want the variable value to be a part of the method name Is there any way this is possible?
def play_with_toy(self):
toy = gui.buttonbox(
msg = 'Choose a toy for your potato head to play with:',
title = 'Choose a Toy',
choices = self.toys)
method_name = 'play_' + toy + '()'
myPotatoHead.method_name
Using Python 2.5.4 for Mac (IDLE) and easygui 0.83
Thanks for any help