I'm coming from a javascript backend to Python and I'm running into a basic but confusing problem
I have a string that can contain a value of either 'left', 'center', or 'right'. I'm trying to test if the variable contains either 'left' or 'right'.
In js its easy:
if( str === 'left' || str === 'right' ){}
However, in python I get a syntax error with this:
if str == 'left' || str == 'right':
Why doesn't this work, and what's the right syntax?