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