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