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


l1=[10, 20, 30]
l2=[-10, -20, -30]
l3=[x+y for x, y in zip(l1, l2)]
print(l3)

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