Level 10 : what is the output of the following code?


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

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