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