I have a question for comprehending the behaviour of this method:
I needed to distinguish elements of a list through checking if they have a specific character in them. I used the following code to test the behaviour of ‘.find’
test2 =  test = ['white', 'black&white', 'greenayellow&blue'] for i in test: test2.append(i.find('&')) print(test2)
this gave me the list
[-1, 5, 12]
I mean, this is really useful for checking what I want, but I don’t understand why ‘.find’ returns “-1” if the searched for string is not in the element.