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