Hi i would like to display all the field of my powerAll like this :

Choose a power :
Froid devorant : Embrase lenemi et le feu bruler
Flammes infernales : 'Gele lenemi sur place

-----------------------------
class Character():
  def ChoosePouvoirUnique(self):
        print ("Choose a power")
        for Power in powerAll:
            print (Power)

class Power:
    def __init__(self, name, desc):
        self.name = name
        self.desc = desc




powerAll = [
 Power('Flammes infernales' , 'Embrase lenemi et le feu bruler'),
 Power('Froid devorant', 'Gele lenemi sur place')]


But he won't display it :(

i've try   For PowerName,PowerDesc in powerAll:
                print (PowerName, PowerDesc)

but it doesn't work !

Thank you again..

-- 
Brookes Christopher.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to