| Python 2.2 für Einsteiger | ||
|---|---|---|
| <<< Previous | Einführung anhand von Beispielen | Next >>> |
#!/usr/bin/python
def ausgabefilter(listenelemente):
return listenelemente > 23
print filter(ausgabefilter, [10, 22, 23, 24, 5, 30, 45])
print filter(None, [10, 0, None, 23, -3, "", "hallo", [], "Ende!"])
| <<< Previous | Home | Next >>> |
| Restmenge | Up | Pickle 2 |