Select rooms with names containing "string" - Python code won't work in Dynamo?

Hi! I’m new to Python and Dynamo, i’m trying to make a script that would select elements with parameters containing a specified string. I adapted a code snipped from a youtube guide. By some reason in Dynamo it only works if the input string mathches the parameter string exactly, although i tried it out in Google Python Notebooks and it works there just fine.


I solved this by replacing list.count with len(list). I wonder why did list.count work for matching full strings but not for a substring search…