Skip to Content
Programmieren von Kopf bis Fuß
book

Programmieren von Kopf bis Fuß

by David Griffiths, Paul Barry
April 2010
Beginner to intermediate
440 pages
9h 7m
German
O'Reilly Verlag
Content preview from Programmieren von Kopf bis Fuß

Die Methode split() zerlegt den String

Stellen Sie sich vor, Sie hätten eine Variable, die einen String mit mehreren Wörtern enthält. Betrachtet wir diese Variable als ein beschriftetes Gefäß:

image with no caption

Der String rockband bietet wie alle Python-Strings eine split()-Methode, die eine Sammlung mit Teilstrings liefert: einen für jedes Wort im ursprünglichen String.

Mit einer Funktionalität, die man als Mehrfachzuweisung bezeichnet, können Sie das Ergebnis der split()-Operation nehmen und einer Sammlung von Variablen zuweisen:

image with no caption

Jeder Rückgabewert der split()-Operation ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Softwareentwicklung von Kopf bis Fuß

Softwareentwicklung von Kopf bis Fuß

Dan Pilone, Russ Miles
Netzwerke von Kopf bis Fuß

Netzwerke von Kopf bis Fuß

Al Anderson, Ryan Benedetti

Publisher Resources

ISBN: 9783868993127Purchase bookSupplemental Content