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