21 lines
441 B
Plaintext
21 lines
441 B
Plaintext
From: aa8vb at vislab.epa.gov (Randall Hopper)
|
|
Date: Mon, 5 Apr 1999 12:58:16 GMT
|
|
Subject: nested map() ?
|
|
Message-ID: <19990405085816.A787115@vislab.epa.gov>
|
|
X-UID: 1632
|
|
|
|
To generate all permutations of list elements in Perl, it's sometimes
|
|
useful to do this:
|
|
|
|
@result = map { $a = $_ ; map{ "$a$_" } @B } @A
|
|
|
|
Is there a relatively short way to do this in Python?
|
|
|
|
Thanks,
|
|
|
|
Randall
|
|
|
|
|
|
|
|
|