Level 10 : What is the output of the following code?


x = {1, 2, 3}
y = {3, 4, 5}

print(x & y)
print(x | y)
print(x - y)

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