Re: how to match list members in py3.x

2018-11-26 Thread Ethan Furman
On 11/25/2018 08:30 AM, Muhammad Rizwan wrote: > IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART > ASS. On 11/25/2018 08:49 AM, Muhammad Rizwan wrote: > IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART > ASS. On 11/25/2018 10:55 AM, Muhammad Rizwan

Re: how to match list members in py3.x

2018-11-26 Thread Michael F. Stemper
On 25/11/2018 11.41, Richard Damon wrote: > On 11/25/18 12:28 PM, Muhammad Rizwan wrote: >> handle = open('file.txt') >> newlist = list() >> for line in handle: >> #line.rstrip() >> linewords = line.split() >> print(linewords) >> >> for word in linewords: >> newlist.append(word)

Re: how to match list members in py3.x

2018-11-26 Thread mm0fmf
On 25/11/2018 16:49, Muhammad Rizwan wrote: IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART ASS. *plonk* -- https://mail.python.org/mailman/listinfo/python-list

Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
On Sunday, 25 November 2018 13:48:42 UTC-5, Alister wrote: > On Sun, 25 Nov 2018 08:49:03 -0800, Muhammad Rizwan wrote: > > > On Sunday, 25 November 2018 10:59:46 UTC-5, Alister wrote: > >> On Sun, 25 Nov 2018 07:43:42 -0800, Muhammad Rizwan wrote: > >> > >> > for each word in each line how

Re: how to match list members in py3.x

2018-11-25 Thread Alister via Python-list
On Sun, 25 Nov 2018 08:49:03 -0800, Muhammad Rizwan wrote: > On Sunday, 25 November 2018 10:59:46 UTC-5, Alister wrote: >> On Sun, 25 Nov 2018 07:43:42 -0800, Muhammad Rizwan wrote: >> >> > for each word in each line how can we check to see if a word is >> > already present in a list and if it

Re: how to match list members in py3.x

2018-11-25 Thread Richard Damon
On 11/25/18 12:28 PM, Muhammad Rizwan wrote: > Below is my approach which I am sure is wrong somewhere and it doesn't work > the way expected, the append doesn't do anything in my code nor does it > returns any traceback all i see is a empty list printed at the end, I am > using win10 x64

Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
On Sunday, 25 November 2018 12:14:37 UTC-5, Joel Goldstick wrote: > On Sun, Nov 25, 2018 at 11:51 AM Muhammad Rizwan > <> wrote: > > > > On Sunday, 25 November 2018 11:41:56 UTC-5, Joel Goldstick wrote: > > > On Sun, Nov 25, 2018 at 11:36 AM Muhammad Rizwan > > > <> wrote: > > > > > > > > IF YOU

Re: how to match list members in py3.x

2018-11-25 Thread Joel Goldstick
On Sun, Nov 25, 2018 at 11:51 AM Muhammad Rizwan wrote: > > On Sunday, 25 November 2018 11:41:56 UTC-5, Joel Goldstick wrote: > > On Sun, Nov 25, 2018 at 11:36 AM Muhammad Rizwan > > <> wrote: > > > > > > IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART ASS. > > > > > > > > >

Re: how to match list members in py3.x

2018-11-25 Thread tony
On 25/11/2018 17:30, Muhammad Rizwan wrote: > IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART ASS. > > Why would anyone want to help you? -- https://mail.python.org/mailman/listinfo/python-list

Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
On Sunday, 25 November 2018 11:41:56 UTC-5, Joel Goldstick wrote: > On Sun, Nov 25, 2018 at 11:36 AM Muhammad Rizwan > <> wrote: > > > > IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART ASS. > > > > > > -- > > https://mail.python.org/mailman/listinfo/python-list > > That

Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
On Sunday, 25 November 2018 10:59:46 UTC-5, Alister wrote: > On Sun, 25 Nov 2018 07:43:42 -0800, Muhammad Rizwan wrote: > > > for each word in each line how can we check to see if a word is already > > present in a list and if it is not how to append that word to a new list > > the 1st step is

Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
Thank you -- https://mail.python.org/mailman/listinfo/python-list

Re: how to match list members in py3.x

2018-11-25 Thread Joel Goldstick
On Sun, Nov 25, 2018 at 11:36 AM Muhammad Rizwan wrote: > > IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART ASS. > > > -- > https://mail.python.org/mailman/listinfo/python-list That isn't a productive way to get assistance. It is true that people here are often very

Re: how to match list members in py3.x

2018-11-25 Thread Brian Oney via Python-list
On Sun, 2018-11-25 at 07:43 -0800, Muhammad Rizwan wrote: > for each word in each line how can we check to see if a word is already > present in a list and if it is not how to append that word to a new list For your problem consider a set. https://en.wikipedia.org/wiki/Set_theory For the python

Re: how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
IF YOU CAN'T HELP BETTER IGNORE THE POST AND DON'T TRY TO BE A SMART ASS. -- https://mail.python.org/mailman/listinfo/python-list

Re: how to match list members in py3.x

2018-11-25 Thread Alister via Python-list
On Sun, 25 Nov 2018 07:43:42 -0800, Muhammad Rizwan wrote: > for each word in each line how can we check to see if a word is already > present in a list and if it is not how to append that word to a new list the 1st step is to stay awake in class & listen to your instructor, then try to apply

how to match list members in py3.x

2018-11-25 Thread Muhammad Rizwan
for each word in each line how can we check to see if a word is already present in a list and if it is not how to append that word to a new list -- https://mail.python.org/mailman/listinfo/python-list