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