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