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