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