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