In my python code, I am attempting to implement an if..else statement. See below:
if index[y] == index[x]: continue else index[y] != index[x] indexdn = indexd indadd= index[y]-index[x] indexdn[:,y]=indexdn[:,y]+ indadd index[y,:]=-indexdn[:,y] indexdn[y,y]=0
However, no matter how many different ways I attempt to write else index[x] is not equal to index[y] I get a syntax error on return of this line. I have tried using else, elif, and for the not operand, != and 'is not'. What is the proper way to write a Python statement using a "not equal" operand so that I do not receive a syntax error?