Level 1 : What will be the output of the following Python function?


sum(2,4,6)
sum([1,2,3])

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