Level 9 : What will be the output of the following Python code?


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

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