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