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