GHpython checks whether a string is contained in a list

Hi guys,
How can GHpython checks wheter a string is contained in a list?
My case is a bit special.
For example: there is a list [ ‘bear’,‘very’,‘string’]
and I have a string ‘brownbear’, and this string contains ‘bear’ in this list, so how can I make it check it as true?

words =  ['bear', 'very', 'string']
string = 'brownbear'
print(any(word in string for word in words))
2 Likes