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