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