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