Level 5 : What will be the result of len(s) after execution?


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

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