Level 1 : What is the output of the following code?


s = {1, 2, 3}
s.add([4, 5])

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