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


list_ = [10,30,40]
list_2 = list_.insert(2, 20)
print(list_)

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