How to write multiple "not" in a single line?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dumuz

I want the while statement to stop once the name of a node changes.

while not "Cam" in A or not "GO" in A:
		A = t.back().get_name()

It works if I only have one not for one string, but the moment I put in another string to check, it just freezes up.

What is the proper way to write this?

Try while not ("Cam" in A or "GO" in A):.

Bubu | 2021-06-05 03:29