very new to this so bear with me please...
I got a predefined list of words
checklist = ['A','FOO']
and a words list from line.split()
that looks something like this
words = ['fAr', 'near', 'A']
I need the exact match of checklist
in words
, so I only find 'A':
if checklist[0] in words:
That didn't work, so I tried some suggestions I found here:
if re.search(r'\b'checklist[0]'\b', line):
To no avail, cause I apparently can't look for list objects like that... Any help on this?