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