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