Excluding words in Conditions in Python -


I am currently trying to write a program where I have many statuses I list the words from a list of tokens (Et) wanted to exclude if lane (w) & lt; = 8: , this worked as I wanted, however, I could not find the program to find any word in the list of tokens and put them out of print.

This is what I have:

  det = ['the', 'a', '', '' '] w; If not then def def in BT_pos1 (w): for w in tkV: if w.islower (): If lane (w)> = 3: If lane (w)    

your det looks invalid (check quotes Please).

If you are often in an element list or not, then you can use a set () , which is very fast to check the content.

This can look completely:

  for det to set = (tkV) (["the", "a", "a", " S "]) 3 & lt; = Len (w) & lt; = 8 and not in w and w.islower (): Print w can be 'a BT.'    

Comments