I am trying to check through a list to see if any of the strings inside it contain the word "Temperature" and I’m trying to use a for loop to do this but it doesn’t seem to want to work.
It seems like it won’t iterate because the list is all strings but I’ve used a for loop to iterate through strings before so I’m not sure what I’m doing wrong.
I would appreciate any help.
You are trying to retrieve the value by
str as the error says.
As you’ll see, you’ll get
A solution for this problem is as follows
line = split_lines[i]
"Temperature" in i
temperature_string = i