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