| Python 2.2 für Einsteiger | ||
|---|---|---|
| <<< Previous | Einführung anhand von Beispielen | Next >>> |
#!/usr/bin/python2.2
class Affe:
def show(self):
print "Ich bin der Affe"
class Auto:
def show(self):
print "Hier ist das Auto"
class Haus:
def show(self):
print "Das ist das Haus"
list = []
list.append (Affe())
list.append (Auto())
list.append (Haus())
for x in list:
x.show()
| <<< Previous | Home | Next >>> |
| GGT/KGV | Up | Destruktor !!!!!!! |