Level 10 : What will be the content of s after execution?


s = {1, 2, 3}
s.add(4)
s.discard(3)

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