[Tutor] Splitting a Tuple in Python 2.7

Greg Nielsen gollumgreg407366 at gmail.com
Tue Dec 6 03:31:33 CET 2011


The following gets returned from a function that I am calling.

(120, 400)

While I can use the Tuple as is in my program, I would like the ability to
change one or even both of the numbers depending on other events that
happen. So here is my question, is there a way to either 1) save each part
of the Tuple into a seperate variable or 2) edit just one part of the Tuple
without knowing or affecting the other number. Thanks for the help!

Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111205/0ee8307d/attachment.html>


More information about the Tutor mailing list