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