New About Yours API Help
673 bytes, Python 3
class Player:

    def __init__(self, name):
        # this makes the name available outside this __init__
        # so we can print(akuli.name) or use it in play() below
        # self is akuli or brain901
        self.name = name

    def play(self):
        print(self.name, "is playing...")

    # you can define as many methods you want, just like functions
    # they all take self and do something with it


akuli = Player('Akuli')
print("akuli's name is", akuli.name)    # akuli.name was set in __init__
akuli.play()    # now play()'s self is akuli

# you can make as many instances as you want, and they can all play
brain901 = Player('brain901_')
brain901.play()
Pasted 5 days ago — Expires in 2 days
URL: http://dpaste.com/37SVE5V