Level 1 : What will be the output of s.difference(t)?


s = {1, 2, 3}
t = {3, 4, 5}

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