I am starting out with Python and trying to do something in one line of code.
resourceProperties = 'test test token test' rpAttrs = [ ['ajgagag', 'knkagga'], ['token', 'knkagga'], ['ajgagag', 'knkagga'] ] for value in rpAttrs if not list(re.finditer(value[0], resourceProperties)) : print value[0]
I get the following error and am not sure what exactly is wrong, because I saw similar Python code where it immediately follows a list for a list.
Syntax Error: invalid syntax
The error indicates if .
My goal is to print every search request in rpAttrs that doesn't appear in resourceProperties . I am curious to try to do this in only one line of code. Can someone tell me what I am doing wrong?
source share