Re: [Tutor] Help on best way to check resence of item inside list

2014-05-27 Thread Peter Otten
jarod...@libero.it wrote: > Dear All > > clubA= ["mary","luke","amyr","marco","franco","lucia", "sally","genevra"," > electra"] > clubB= ["mary","rebecca","jane","jessica","judit","sharon","lucia", > "sally"," Castiel","Sam"] > > I have a list of names that I would to annotate in function of pr

Re: [Tutor] Help on best way to check resence of item inside list

2014-05-27 Thread Steven D'Aprano
On Tue, May 27, 2014 at 10:05:30AM +0200, jarod...@libero.it wrote: [...] > with open("file.in") as p: > mit = [] You have lost the indentation, which makes this code incorrect. But the rest of the code is too complicated. > for i in p: >lines =i.strip("\n").split("\t") >if (lines[0] in

Re: [Tutor] Help on best way to check resence of item inside list

2014-05-27 Thread Dave Angel
"jarod...@libero.it" Wrote in message: > Dear All > > clubA= ["mary","luke","amyr","marco","franco","lucia", "sally","genevra"," > electra"] > clubB= ["mary","rebecca","jane","jessica","judit","sharon","lucia", "sally"," > Castiel","Sam"] > > I have a list of names that I would to annotate in f

Re: [Tutor] Help on best way to check resence of item inside list

2014-05-27 Thread Mark Lawrence
On 27/05/2014 09:05, jarod...@libero.it wrote: Dear All clubA= ["mary","luke","amyr","marco","franco","lucia", "sally","genevra"," electra"] clubB= ["mary","rebecca","jane","jessica","judit","sharon","lucia", "sally"," Castiel","Sam"] I have a list of names that I would to annotate in function

[Tutor] Help on best way to check resence of item inside list

2014-05-27 Thread jarod...@libero.it
Dear All clubA= ["mary","luke","amyr","marco","franco","lucia", "sally","genevra"," electra"] clubB= ["mary","rebecca","jane","jessica","judit","sharon","lucia", "sally"," Castiel","Sam"] I have a list of names that I would to annotate in function of presence in different clubs: my input files