Level 1 : What will this output?


lst = [[1, 2], [3, 4]]
result = [sum(x) for x in lst]
print(result)

Author: SandhyaR | Tags: list | 1736+ Python FAQs | Share
max-min | version | object-attribute | numpy | exception | __all__-attribute | matplotlib | matrix | version-check | lambda | call | global-variable | memory | odd-number | class | functional-programming | type_conversion | turtle | loop-control | input-function | virtual-environment | iterable | global-keyword | feature | exception-handling | inheritance | operator-and | string-iteration | string-method | update | string-formatting | goto-function | return-statement | identifier | mapping-function | namespace | integer | sys | choice | immutability | package-management | pandas | pep | binary-operation | datetime | list-comprehension | generators-in-python | set-operation | regular-expression | inherit | library | data_structure | type-conversion | math | datatype | frozenset | regex | decorator | destructor | sorting | while-and-for-loop | built-in | set | operations | assert | class-and-instance-variable | lambda-function | precedence | def | dictionary | methods | static-method | head-and-tail | oops | string-manipulation | python-repl | copy | class-and-inheritance | factorial-function | file-handling | match | decimal | list-vs-tuple | enumerate() | fabs-function | min-max-function | multiprocessing | tuple | loop | data-type | comparison | identity-operator | string-slicing | exception-handling | built-in-function | bitwise-operator | append | threading | file-handling | gil | pickling-&-unpickling | mathematical-function | yield | int | sys-module | error | precedence-and-associativity | min-function | immutable-data-type | variable | dictionaries | function | operator-overloading | file_handling | assignment-operator | name-mangling | iterator | slice | built-in-function | conditional-statement | round-function | expression | thread | zfill-function | design-principle | python_version | data-structures | conversion | deep-copy | round | list-method | array | default-mutable-argument | functions | multiple-inheritance | import-method | list-slicing | identity-operator | virtual-environment | operators | basic | docstring | print | id-function | asyncio-module | string-concatenation | join | classes | input | list-indexing | range | encoding | benefit | python-history | arithmetic-operation | for | string-method | logical-operator | sum-function | sum() | memory-management | list-mutation | mutable | numeric | filter-function | function-argument | lists | data-type | statement | pseudocode | else-statement | python-django | filter | floating-point-precision | class-and-object | indentation | magic-method | higher-order-function | indexing | recursion | postfix | scientific-notation | application | module | overflow | mathematics | raise | list-comprehension | list-operation | debugging | list-join | heap-memory | mysql | counter | counter-function | objects | collection | print-statement | operator | invalid-list | escape-operator | command-line-parsing | attribute | complex | __future__ | syntaxerror | loops | oop | control-statement | while-else-loop | with-statement | map-function | syntax-error | constructor | installation | list | typeerror | parameter | input-function | error-handling | syntax | binary | boolean | python-module | file | slicing | global-variable | rollback | swapping | multithreading | matrix-list-comprehension | zip-function | formal-and-actual-parameter | type-conversion | lambdas | random | expand-tab | comprehension | boolean-and-non-boolean | operator-or | string | comment | bitwise-operator | python | staticmethod | __init_subclass__ | dicts | condition | math-copysign | recurssion | descriptors | keyword | touples | arithmetic-expression | software-design | string-formatting | interpreter | operand | data-structure | collections | namedtuple | syntax-error | data-structure | logical-operator | string-slicing | encapsulation | sorted | shallow-copy | polymorphism | exponentiation | function-and-scope | async | complex-number | center | generators | init | control-flow | context-manager | nested-loop | implementation | method | control-flow | format | access-modifier | bitwise | generator | tuple-unpacking | conditional-statement | compute | global | stack | split | zip | while-loop | random-function | logical-operation | asyncio ...