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