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