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


l=[1, 2, 3, 4, 5]
m=map(lambda x:2**x, l)
print(list(m))

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