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