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