Avatar ·

How to check if a line contains any word from a list?

📁 List, string, Advanced Python Topics, example

For example, there is a list

  words = [, " bicycle "" , ]   

and for example a line

   str  =  "" Fast car ""    

you need to return true , because the line has "car"