How to Calculate the Bitwise Or Result Without Using the | Operator?


The exercise says to calculate the bitwise OR result without using the | operator if possible. How can this be done?

FAQ: Learn Python - Introduction to Bitwise Operators - A BIT of This OR That

Hi @matterz_1lly,

I’m not sure why the exercise words it that way, because the suggested solution uses the | operator. I think the author may have meant for you to not print the answer as a string after calculating what it should be, but to use the | operator in the print statement itself.