Level 9 : What will the following code output?


t = ((1, 2), (3, 4), (5, 6))
print(sum(t[0]))

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