Is there a built-in method for transforming (1, None, "Hello!") to 1, None, "Hello!"?
Alex Martelli
aleax at mail.comcast.net
Fri Nov 11 10:43:05 EST 2005
More information about the Python-list mailing list
Fri Nov 11 10:43:05 EST 2005
- Previous message (by thread): Is there a built-in method for transforming (1, None, "Hello!") to 1, None, "Hello!"?
- Next message (by thread): Is there a built-in method for transforming (1,None,"Hello!") to 1,None,"Hello!"?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Daniel Crespo <dcrespo at gmail.com> wrote: > Is there a built-in method for transforming (1,None,"Hello!") to > 1,None,"Hello!"? You're mentioning two different literal syntaxes for the same object (a tuple) -- the one with parentheses works everywhere, the other one _almost_ everywhere (not where parentheses would be ambiguous). Not sure, therefore, what you mean by "transforming" here; if you're dealing with a string for in either case, for example, you could remove the first and last characters by slicing with [1:-1], etc, etc. Perhaps you can clarify exactly what you're asking for! Alex
- Previous message (by thread): Is there a built-in method for transforming (1, None, "Hello!") to 1, None, "Hello!"?
- Next message (by thread): Is there a built-in method for transforming (1,None,"Hello!") to 1,None,"Hello!"?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list