From this, we can create a class called Felicitations:
class Felicitations(object):
def __init__(self):
self.felicitations = [ ]
def addon(self, word):
self.felicitations.append(word)
def printme(self):
greeting = string.join(self.felicitations[0:], "")
print greeting
The class is based off of another type of object called 'object'. The first method is mandatory if you want the object to know anything about itself (instead of being a brainless mass of functions and variables; the class must have a way of referring to itself. The second method simply adds the value of word to the Felicitations object. Finally, this class has the ability to print itself via a method called 'printme'.
In Python, indentation is important. Every nested block of commands must be indented the same amount. Python has no other way to differentiate between nested and non-nested blocks of commands.



