Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.1K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How do I construct tuples from lists?

Posted 12 years ago
POSTED BY: Jim Simons
2 Replies
Posted 12 years ago
POSTED BY: Jim Simons

Try this:

a = {1, 2}; b = {3}; c = {4, 5};
Tuples[{a, b, c}]
(* {{1, 3, 4}, {1, 3, 5}, {2, 3, 4}, {2, 3, 5}}  *)
POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard