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


a=165
b=sum(list(map(int,str(a))))
print(b)

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