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