Level 10 : What will be the result of the following code?


a = {1, 2, 3}
b = {3, 4, 5}
print(a & b | a - b)

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