Level 5 : What does this output?


lst = [1, 2, 3]
print(len(lst) + sum(lst))

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