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


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

Author: SarojiniD | Tags: mapping-function | 1736+ Python FAQs | Share
raise | dicts | encoding | global-variable | random-function | sys | zfill-function | random | format | pseudocode | operators | python-django | data-structure | decimal | round-function | python-repl | objects | file | method | installation | object-attribute | functional-programming | invalid-list | mutable | virtual-environment | destructor | generators | python-history | logical-operator | lambda-function | input-function | matplotlib | staticmethod | datatype | return-statement | operator-and | classes | pickling-&-unpickling | module | string-method | syntax-error | loops | implementation | integer | bitwise-operator | function | factorial-function | else-statement | lists | string-formatting | list-vs-tuple | mathematical-function | math | identifier | while-else-loop | gil | basic | slicing | logical-operation | polymorphism | memory | set-operation | conditional-statement | fabs-function | stack | yield | call | logical-operator | mysql | constructor | comment | with-statement | asyncio-module | loop | expand-tab | conversion | library | default-mutable-argument | datetime | slice | enumerate() | list-operation | immutable-data-type | touples | built-in-function | arithmetic-operation | input-function | sum() | postfix | goto-function | deep-copy | multiple-inheritance | syntax-error | class-and-inheritance | zip-function | filter | boolean-and-non-boolean | comparison | precedence-and-associativity | print-statement | expression | __future__ | exception-handling | lambdas | parameter | iterator | choice | virtual-environment | data_structure | data-structure | swapping | regex | operand | threading | string-slicing | pep | application | rollback | data-type | min-function | generators-in-python | complex-number | center | data-type | feature | multiprocessing | built-in-function | heap-memory | magic-method | input | oop | error-handling | function-and-scope | iterable | __init_subclass__ | access-modifier | debugging | asyncio | update | built-in | operator-or | tuple-unpacking | exponentiation | syntax | turtle | higher-order-function | bitwise | __all__-attribute | memory-management | recurssion | methods | collection | filter-function | dictionaries | string-iteration | sorting | mapping-function | matrix | int | numpy | sys-module | frozenset | command-line-parsing | context-manager | list-join | collections | list-method | floating-point-precision | while-and-for-loop | namedtuple | python_version | variable | class-and-object | mathematics | file_handling | loop-control | operations | string-manipulation | complex | multithreading | docstring | class-and-instance-variable | numeric | counter | design-principle | inherit | match | async | pandas | overflow | version-check | join | string-method | split | id-function | binary | sum-function | print | list-comprehension | list-comprehension | bitwise-operator | list-mutation | map-function | class | benefit | exception | file-handling | while-loop | conditional-statement | statement | assert | python-module | binary-operation | oops | round | matrix-list-comprehension | control-statement | string | control-flow | array | operator | boolean | global-keyword | indentation | identity-operator | version | scientific-notation | typeerror | keyword | static-method | control-flow | decorator | error | counter-function | max-min | exception-handling | operator-overloading | immutability | dictionary | escape-operator | identity-operator | global-variable | attribute | encapsulation | python | string-slicing | condition | indexing | formal-and-actual-parameter | descriptors | head-and-tail | inheritance | append | function-argument | math-copysign | type-conversion | string-formatting | zip | thread | min-max-function | recursion | list-slicing | lambda | syntaxerror | for | type-conversion | data-structures | tuple | package-management | compute | import-method | functions | odd-number | def | file-handling | precedence | arithmetic-expression | copy | string-concatenation | init | list-indexing | list | software-design | interpreter | nested-loop | regular-expression | comprehension | set | name-mangling | sorted | assignment-operator | namespace | range | global | generator | shallow-copy | type_conversion ...