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