osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to match list members in py3.x


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 syntax consider the py3 tutorial.
https://docs.python.org/3/tutorial/index.html

HTH