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