Re: [Tutor] Getting single values of a tuple & storing them

2007-11-01 Thread Alan Gauld
"Trey Keown" <[EMAIL PROTECTED]> wrote > 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. Tuples are like any other Python collection or sequence. You can access

Re: [Tutor] Getting single values of a tuple & storing them

2007-10-31 Thread Bill Burns
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[

[Tutor] Getting single values of a tuple & storing them

2007-10-31 Thread Trey Keown
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. ___ Tutor maillist - Tutor@python.org http://mail