Possible to slice a string with unpacked tuple?

python at bdurham.com python at bdurham.com
Sat Jan 24 17:59:14 EST 2009


Benjamin,
> Use the built-in slice.
Perfect!! That's exactly what I was looking for - I didn't know
this object existed.
> What's wrong with unpacking the tuple?
I'm extracting fields from a huge, multi-gig log file. I was
trying to avoid doing something like myString[ myTuple[ 0 ]:
myTuple[ 1 ] )  millions of times in a loop.

Thank you!
Malcolm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090124/2946a69a/attachment.html>


More information about the Python-list mailing list