Re: [newbie] troubles with tuples

2014-02-03 Thread Denis McMahon
On Mon, 03 Feb 2014 08:50:31 -0800, Jean Dupont wrote: > I'm looking at the way to address tuples e.g. > tup2 = (1, 2, 3, 4, 5, 6, 7 ); > > As I found out indices start with 0 in Python, so tup2[0] gives me 1, > the first element in the tuple as expected tup2[1] gives me 2, the > second element i

Re: [newbie] troubles with tuples

2014-02-03 Thread Terry Reedy
On 2/3/2014 11:50 AM, Jean Dupont wrote: I'm looking at the way to address tuples e.g. tup2 = (1, 2, 3, 4, 5, 6, 7 ); As I found out indices start with 0 in Python, so tup2[0] gives me 1, the first element in the tuple as expected tup2[1] gives me 2, the second element in the tuple as expected n

Re: [newbie] troubles with tuples

2014-02-03 Thread Jean Dupont
Op maandag 3 februari 2014 18:06:46 UTC+1 schreef Rustom Mody: > On Monday, February 3, 2014 10:20:31 PM UTC+5:30, Jean Dupont wrote: > > I'm looking at the way to address tuples > > e.g. > > tup2 = (1, 2, 3, 4, 5, 6, 7 ); > > As I found out indices start with 0 in Python, so > > tup2[0] gives me

Re: [newbie] troubles with tuples

2014-02-03 Thread Rustom Mody
On Monday, February 3, 2014 10:20:31 PM UTC+5:30, Jean Dupont wrote: > I'm looking at the way to address tuples > e.g. > tup2 = (1, 2, 3, 4, 5, 6, 7 ); > As I found out indices start with 0 in Python, so > tup2[0] gives me 1, the first element in the tuple as expected > tup2[1] gives me 2, the se

Re: [newbie] troubles with tuples

2014-02-03 Thread Asaf Las
On Monday, February 3, 2014 6:50:31 PM UTC+2, Jean Dupont wrote: > I'm looking at the way to address tuples > > e.g. > tup2 = (1, 2, 3, 4, 5, 6, 7 ); > As I found out indices start with 0 in Python, so > tup2[0] gives me 1, the first element in the tuple as expected > tup2[1] gives me 2, the seco

Re: [newbie] troubles with tuples

2014-02-03 Thread Larry Martell
On Mon, Feb 3, 2014 at 11:50 AM, Jean Dupont wrote: > I'm looking at the way to address tuples > e.g. > tup2 = (1, 2, 3, 4, 5, 6, 7 ); > > As I found out indices start with 0 in Python, so > tup2[0] gives me 1, the first element in the tuple as expected > tup2[1] gives me 2, the second element in

[newbie] troubles with tuples

2014-02-03 Thread Jean Dupont
I'm looking at the way to address tuples e.g. tup2 = (1, 2, 3, 4, 5, 6, 7 ); As I found out indices start with 0 in Python, so tup2[0] gives me 1, the first element in the tuple as expected tup2[1] gives me 2, the second element in the tuple as expected now here comes what surprises me: tup2[0:1]