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