Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #25660 > unrolled thread

Re: help

Started byTim Chase <python.list@tim.thechases.com>
First post2012-07-19 18:43 -0500
Last post2012-07-19 18:43 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: help Tim Chase <python.list@tim.thechases.com> - 2012-07-19 18:43 -0500

#25660 — Re: help

FromTim Chase <python.list@tim.thechases.com>
Date2012-07-19 18:43 -0500
SubjectRe: help
Message-ID<mailman.2326.1342741348.4697.python-list@python.org>
On 07/19/12 18:26, Prasad, Ramit wrote:
>> ('per1','persona1.1','pro1'),('per1','persona1.1','pro2'),('per1','persona1.1','pro3'),('per1','persona1.1','pro4'),('per1','persona1.1','pro5'),('per2','persona2.1','pro1'),('per2','persona2.1','pro2'),('per2','persona2.1','pro3'),('per2','persona2.1','pro4'),('per2','persona2.1','pro5'),('per2','persona2.2','pro1'),('per2','persona2.2','pro2'),('per2','persona2.2','pro3'),('per2','persona2.2','pro4'),('per2','persona2.2','pro5'),('per2','persona2.3','pro1'),('per2','persona2.3','pro2'),('per2','persona2.3','pro3'),('per2','persona2.3','pro4'),('per2','persona2.3','pro5'),('per2','persona2.4','pro1'),('per2','persona2.4','pro2'),('per2','persona2.4','pro3'
> 
> You can use ast.literal_eval if you add an enclosing () or [] in the string 
> (and add a finishing paren for the last tuple).

If you want a resulting tuple-of-tuple and you have at least one
comma after the first tuple, you don't even have to include the ()
around it.

-tkc

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web