471,325 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

Combinatorial of elements in Python?

I have 2 (or more) groups of elements, and I want to get all possible
unique combinations from all of them. Is there a build-in method to do
it?

ADictionary={"one":["A","B","C","D"],"two":["H","I"]}

I want to have all possible combinations from "one" and "two", that is:

AH
BI
CH
DI
AI
BH
CI
DH

Sounds easy, but is not :)
--
Sebastián Bassi (セバスティアン)
Diplomado en Ciencia y Tecnolog*a.
GPG Fingerprint: 9470 0980 620D ABFC BE63 A4A4 A3DE C97D 8422 D43D
Aug 15 '07 #1
0 811

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Matthew Sims | last post: by
reply views Thread by Peter Dobcsanyi | last post: by
8 posts views Thread by Nickolay Kolev | last post: by
reply views Thread by Alex Vinokur | last post: by
6 posts views Thread by Tekkaman | last post: by
reply views Thread by dudeja.rajat | last post: by
reply views Thread by Timothy Grant | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.