nntp2http.com
Posting
Suche
Optionen
Hilfe & Kontakt

Implizit doppelt iterieren

Von: Ole Streicher (ole-usenet-spam@gmx.net) [Profil]
Datum: 09.07.2009 09:49
Message-ID: <ytzk52ithx3.fsf@news.ole.ath.cx>
Newsgroup: de.comp.lang.python
Hallo,

ich stehe gerade auf dem Schlauch: Ich möchte gerne eine implizite
Iteration "doppelt" durchführen. Sowas wie

s1 = [ 5*i for i in xrange(1000) ]

für

s2 = [ ]
for i in xrange(100):
for j in xrange(100):
s2.append((2*i, 3*j))

Wie mache ich das?

Viele Grüße

Ole

[ Auf dieses Posting antworten ]

Antworten