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