Level 1 : What will be the output of the following Python code?


l=[[1, 2, 3], [4, 5, 6]]
for i in range(len(l)):
	for j in range(len(l[i])):
		l[i][j]+=10
l

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