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


x = ['ab', 'cd']
print(list(map(len, x)))

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