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


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

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