I know this can probably be done in one line and it's pretty simple but I keep failing on syntax. I want to do the following:
for tag in TAGS.values():
if tag in myset:
found_tag = tag
break
I have tried things like
found_tag = tag if tag in myset for tag in TAGS.values()
But I keep getting syntax errors on the for. Is there a one line way to do this in python?
break) once it found the firsttaginmyset?