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