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