Level 5 : What is the output?


print(sum(range(1, 5)))

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