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