Re: Python mange with liste

2013-12-29 Thread Frank Millman
"Bala Ji" wrote in message news:11c1b4ef-07a3-4424-b356-9a9cf635f...@googlegroups.com... > > > hello, > > thank you for your help > > i wrote this: > > x="nam1" > y="F" > > names = [("nam1", "F", "Y"), ("nam2", "M", "N")] > l = len(names) > for i in range(0,l): > print names[i][0] > prin

Re: Python mange with liste

2013-12-29 Thread Rustom Mody
On Sun, Dec 29, 2013 at 3:49 PM, Bala Ji wrote: > > > hello, > > thank you for your help > > i wrote this: > > x="nam1" > y="F" > > names = [("nam1", "F", "Y"), ("nam2", "M", "N")] > l = len(names) > for i in range(0,l): > print names[i][0] > print names[i][1] > if x == nam

Re: Python mange with liste

2013-12-29 Thread Bala Ji
Oh sorry it's a Y (in french it's O) sorry for the mistake Le dimanche 29 décembre 2013 00:30:23 UTC+1, Bala Ji a écrit : > Hello guys, > > i need some help with is program > > > > I have a txt file "test.txt" where there is Name;Sexe;Answer(Y or N) > > example of txt file: > >

Re: Python mange with liste

2013-12-29 Thread Bala Ji
hello, thank you for your help i wrote this: x="nam1" y="F" names = [("nam1", "F", "Y"), ("nam2", "M", "N")] l = len(names) for i in range(0,l): print names[i][0] print names[i][1] if x == names[i][0] and y == names[i][1]: message = "right" else

Re: Python mange with liste

2013-12-29 Thread Piet van Oostrum
Bala Ji writes: > Hello guys, > i need some help with is program > > I have a txt file "test.txt" where there is Name;Sexe;Answer(Y or N) > example of txt file: > -- > nam1;F;Y > nam2;M;N > nam3;F;Y > nam4;M;N > halo;M;Y > rock;M;N > nam1;F;N >

Python mange with liste

2013-12-29 Thread Baladjy KICHENASSAMY
Hello guys, i need some help with is program I have a txt file "test.txt" where there is Name;Sexe;Answer(Y or N) example of txt file: -- *nam1;F*;Y nam2;M;N nam3;F;Y nam4;M;N halo;M;Y rock;M;N nam1;F;N _ so my program will ask t

Re: Python mange with liste

2013-12-28 Thread Rustom Mody
On Sun, Dec 29, 2013 at 8:38 AM, Rustom Mody wrote: > Give up on file-IO, ie dont use the EXTERNAL file > > nam1;F;Y > nam2;M;N > nam3;F;Y > nam4;M;N > halo;M;Y > rock;M;N > nam1;F;N > > But ASSUME you have the internal python data structure > names = [("nam1", "F", "Y"), ("nam2", "M", "N")] # comp

Re: Python mange with liste

2013-12-28 Thread Rustom Mody
On Sun, Dec 29, 2013 at 5:00 AM, Bala Ji wrote: > Hello guys, > i need some help with is program > > I have a txt file "test.txt" where there is Name;Sexe;Answer(Y or N) > example of txt file: > -- > nam1;F;Y > nam2;M;N > nam3;F;Y > nam4;M;N > halo;M;Y > rock;M;N

Python mange with liste

2013-12-28 Thread Bala Ji
Hello guys, i need some help with is program I have a txt file "test.txt" where there is Name;Sexe;Answer(Y or N) example of txt file: -- nam1;F;Y nam2;M;N nam3;F;Y nam4;M;N halo;M;Y rock;M;N nam1;F;N _ so my program will ask the