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