Level 10 : What will be the output of the following Python code?


s1={1, 2, 3}
s2={4, 5, 6}
s1.isdisjoint(s2)
s2.isdisjoint(s1)

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