We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is an "OR" operator ready to use? I tried | and it seems to work some of the time, but not always:
|
a = 22 if a < 10 | a > 20: print "a is NOT between 10 and 20" else: print "I don't know what a is"
I'd expect the above code to print "a is NOT between 10 and 20", but playground prints "I don't know what a is".
I'll note that the following works as expected:
a = 22 if a < 10: print "a is less than 10" if a > 20: print "a is greater than 20" else: print "I don't know what a is"
And thus I suspect this is an issue with the OR logic. Apologies if it's just not implemented yet -- it's not mentioned in the Docs at the moment.
The text was updated successfully, but these errors were encountered:
Whoops, or operator seems to be just or. My bad.
or
Sorry, something went wrong.
No branches or pull requests
Is an "OR" operator ready to use? I tried
|
and it seems to work some of the time, but not always:I'd expect the above code to print "a is NOT between 10 and 20", but playground prints "I don't know what a is".
I'll note that the following works as expected:
And thus I suspect this is an issue with the OR logic. Apologies if it's just not implemented yet -- it's not mentioned in the Docs at the moment.
The text was updated successfully, but these errors were encountered: