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