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