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