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