Level 10 : What will be printed by this code?


x = 3
y = x | 2 & 1 ^ 5
print(y)

Author: SandhyaR | Tags: operator | 1859+ Python FAQs | Share
exception-handling | pseudocode | list-operation | mathematics | typeerror | list-method | regular-expression | control-statement | matrix-list-comprehension | dicts | membership-operators-(in,-not-in) | datetime.date,-datetime.time,-datetime.datetime | compute | class-and-instance-variable | generators-in-python | data-type-conversions | filter | split | context-manager | functions | counter-function | mathematical-function | string-methods | assignment-operator | class-and-object | deep-copy | matrix | anchors-(^,-$) | regex | call | virtual-environment | string-manipulation | frozenset | version | assert | math-copysign | walking-through-directories-using-os.walk() | multithreading | class-and-inheritance | multiple-inheritance | regular-expressions | arithmetic-expression | identity-operators-(is,-is-not) | min-max-function | touples | conditional-statement | asyncio-module | arithmetic-operation | loop-control-statements | append | conditional-statements | global-keyword | type-conversion | list-mutation | namespace | sorted | multiprocessing | datatype | error-handling | type_conversion | working-with-binary-files-(rb,-wb) | literal-characters-and-special-characters | complex | nested-loop | goto-function | key-value-pairs | data-type | update | unit-testing | string-slicing | mutable | global | shallow-copy | max-min | python | string-iteration | list,-set,-and-dictionary-comprehensions | else | list-comprehensions | statement | sets | list-join | built-in-function | recurssion | integers | logical-operation | floats | decimal | using-lists-as-stacks | string-formatting | print-statement | application | descriptors | threading | data-types | expression | using-os-and-pathlib-modules | magic-method | else-statement | library | with-statement | match | indexing | strings | function-and-scope | multiple-except-blocks | tuple | numeric | test-discovery | operators | joining-and-merging-dataframes | control-flow | datetime | type-conversion-and-casting | numpy | pass | rollback | complex-number | swapping | default-mutable-argument | format | polymorphism | intering | syntaxerror | thread | aggregating-data-with-functools.reduce() | formal-and-actual-parameter | floating-point-precision | installation | conditional-statement | type-conversion | async | method-overloading | built-in | min-function | class | default-arguments | file_handling | operations | software-design | working-with-dates-and-times | writing:-write(),-writelines() | built-in-function | choice | pandas | error-handling | data-type | binary | precedence-and-associativity | list | inheritance | feature | defining-functions | expand-tab | map-function | using-assertions-(assertequal,-assertraises) | python-history | overflow | functional-programming | invalid-list | immutability | collection | escape-operator | lambda-functions | object-attribute | while-and-for-loop | filtering-and-indexing | operand | using-map()-for-transformations | assignment-operators | __init_subclass__ | constructor | objects | single-inheritance | round | lambda-function | syntax | function | string-formatting | sys | staticmethod | odd-number | global-variable | parameter | join | inherit | logical-operator | pep | copy | bitwise-operator | dictionary-comprehensions | zfill-function | condition | math | iterator | slicing | operator | filter-function | logical-operators | round-function | integer | encoding | mysql | identity-operator | recursion | gil | sum-function | loop | decorator | time-series-with-pandas | import-method | lists | counter | range | command-line-parsing | operator-or | list-vs-tuple | data-structures | print | list-indexing | error | set | loop-control | reading:-read(),-readline(),-readlines() | factorial-function | interpreter | bitwise | working-with-temporary-files-using-tempfile | reading-and-writing-files | raise-statement | managing-directories-with-os-and-shutil | stack | debugging | using-yield-in-functions | multiple-inheritance | comparison | variable | advanced-file-operations | using-else-and-finally | name-mangling | destructor | slice | version-check | python-repl | keyword | using-join()-and-is_alive()-methods | control-flow | scientific-notation | encapsulation | return-statement | introduction-to-multiprocessing | dataframe-and-series-objects | mapping-function | def | raise | design-principle | postfix | collections | package-management | boolean-and-non-boolean | python-syntax-and-structure | oop | module | while-loops | tuples | sys-module | data-structure | dictionary | binary-operation | exception | logical-operator | fabs-function | difference-between-threads-and-processes | data-structure | higher-order-function | generator | python-module | input | list-comprehension | __future__ | comprehension | set-operation | pickling--unpickling | lambda | functional-programming | parsing-with-strptime | formatting-with-strftime | creating-custom-modules | basic | docstring | zip | random-function | python-operators | tuple-unpacking | data_structure | sorting | dictionaries | virtual-environment | global-variable | thread-synchronization | center | matplotlib | string-method | sorting-and-ranking | asyncio | list-methods-and-slicing | string-slicing | working-with-file-paths | data-structures-in-python | turtle | overriding-methods | introduction-to-threads | input-function | enumerate() | static-method | memory-management | exponentiation | heap-memory | indexing:-loc-vs-iloc | indentation | conversion | string-concatenation | while-else-loop | directory-operations | method | dictionary-methods | immutable-data-type | introduction-to-python | init | loops | file-handling | quantifiers-(*,-+,-?,-{}) | boolean-masking | benefit | function-argument | creating-and-starting-threads | list-slicing | list-comprehension | zip-function | classes | file | sum() | boolean | using-the-threading-module | tuple-methods | python-django | memory | operator-overloading | identity-operator | array | file-handling | string-method | why-use-multiprocessing-over-threading?-(gil) | syntax-error | built-in-modules | input-function | methods | random | int | comment | iterable | bitwise-operator | namedtuple | id-function | exception-handling | access-modifier | booleans | lambdas | reading-and-writing-large-files-efficiently | oops | iterators | yield | while-loop | for | thread-safe-data-structures-(queue.queue) | opening-files-(open()) | string | syntax-error | precedence | arbitrary-arguments-(*args,-**kwargs) | operator-and | attribute | head-and-tail | __all__-attribute | identifier | implementation | handling-missing-values-(fillna,-dropna) | class-decorators | generators | python_version ...