Converting {{a,b},{c,d}} to just {a,b},{c,d} (no enclosing parens) ?
- To: mathgroup at smc.vnet.net
- Subject: [mg28766] Converting {{a,b},{c,d}} to just {a,b},{c,d} (no enclosing parens) ?
- From: aes <siegman at stanford.edu>
- Date: Fri, 11 May 2001 20:00:44 -0400 (EDT)
- Organization: Stanford University
- Sender: owner-wri-mathgroup at wolfram.com
How can I convert a list of pairs, like {{a,b},{c,d},{e,f},. . . }} into just a sequence of pairs, i.e. {a,b}, {c,d}, {e,f}, . . . with no outer { }'s? Reason for doing this? Want to define a Line in the form Line[{pt1, pt2, pt3, pt4, pt5, pt6, . . . . . . }] where some of the points, say pt1 through pt4 are individually defined; but then a sequence, say pt5 through pt20, are defined by a Table; then pt21, etc are back to individual definitions. I know -- I could break these into a sequence of Lines -- but it would be cleaner if there were a simple way to have one Line[ ] command with all the points inside it.
- Follow-Ups:
- Re: Converting {{a,b},{c,d}} to just {a,b},{c,d} (no enclosing parens) ?
- From: Ken Levasseur <Kenneth_Levasseur@uml.edu>
- Re: Converting {{a,b},{c,d}} to just {a,b},{c,d} (no enclosing parens) ?