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