Trey Keown wrote:
> Hey all,
> I was wondering, how could I get each value inside of a tuple, say it's
> (2,4) .
> The only value I really need is the second one (the tuple will always have
> only two values.
> 
> Thanks for any help.
> 

Try one of these approaches:

In [1]: t = (2, 4)

In [2]: t[0]
Out[2]: 2

In [3]: t[1]
Out[3]: 4

In [4]: first, second = (2, 4)

In [5]: first
Out[5]: 2

In [6]: second
Out[6]: 4

HTH,

Bill
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to