How do I make my python code prettier by shortening each row? For example: I have a really long if statement that I would like to make shorter => split it's length on to a couple of rows:
if (imgA.shape[0] != imgB.shape[0]) and (imgA.shape[1] != imgB.shape[1]) and (imgA.shape[2] != imgB.shape[2]):
I would like to have something like this:
if (imgA.shape[0] != imgB.shape[0]) and
(imgA.shape[1] != imgB.shape[1]) and
(imgA.shape[2] != imgB.shape[2]):
But I get a syntax error. Anyone?