Level 10 : What does the following code print?


t = (1, 2, (3, 4))
print(len(t) + len(t[-1]))

Author: SandhyaR | Tags: tuple | 1736+ Python FAQs | Share
matplotlib | async | recursion | string | assignment-operator | zip-function | string-concatenation | immutable-data-type | fabs-function | binary-operation | while-else-loop | indexing | list-mutation | print-statement | interpreter | feature | complex-number | deep-copy | oops | docstring | arithmetic-operation | global-keyword | logical-operator | built-in-function | python-django | virtual-environment | numpy | turtle | dictionary | pandas | rollback | constructor | python-module | string-formatting | file-handling | print | global | immutability | import-method | identifier | boolean | lists | oop | nested-loop | counter | bitwise-operator | static-method | polymorphism | sys | shallow-copy | datetime | syntax-error | context-manager | sorted | expand-tab | loop | pickling-&-unpickling | basic | precedence-and-associativity | append | input-function | class-and-instance-variable | generator | bitwise | regex | return-statement | call | counter-function | python | list-method | control-flow | heap-memory | data-structure | multithreading | conditional-statement | typeerror | python-history | operator-overloading | application | frozenset | identity-operator | version | encoding | random-function | overflow | join | collections | exponentiation | init | escape-operator | sum() | mysql | syntax-error | scientific-notation | decimal | sorting | debugging | head-and-tail | global-variable | filter-function | data-type | classes | input-function | version-check | string-formatting | expression | id-function | exception-handling | loop-control | goto-function | tuple | exception-handling | asyncio-module | syntax | command-line-parsing | tuple-unpacking | threading | string-method | object-attribute | def | function-argument | parameter | library | mapping-function | set-operation | condition | update | default-mutable-argument | datatype | logical-operation | operator-or | conversion | keyword | collection | matrix-list-comprehension | magic-method | list-join | descriptors | while-loop | data_structure | data-structure | choice | access-modifier | sum-function | center | stack | class | comment | conditional-statement | enumerate() | file | multiple-inheritance | error | logical-operator | min-max-function | invalid-list | function | round-function | boolean-and-non-boolean | __all__-attribute | operator-and | iterable | factorial-function | string-slicing | iterator | comparison | string-iteration | mathematical-function | dicts | min-function | asyncio | encapsulation | data-structures | higher-order-function | control-flow | indentation | function-and-scope | odd-number | with-statement | recurssion | control-statement | lambda | syntaxerror | statement | objects | list-indexing | mathematics | type-conversion | while-and-for-loop | namedtuple | benefit | for | global-variable | array | filter | thread | comprehension | module | file-handling | list-operation | operator | methods | touples | type_conversion | integer | implementation | list-slicing | sys-module | list-comprehension | copy | else-statement | floating-point-precision | built-in-function | zfill-function | class-and-inheritance | regular-expression | inheritance | int | package-management | string-method | precedence | split | binary | slice | data-type | compute | method | pseudocode | loops | variable | map-function | inherit | __future__ | class-and-object | built-in | random | swapping | yield | __init_subclass__ | math-copysign | python-repl | matrix | functions | dictionaries | slicing | design-principle | decorator | pep | type-conversion | string-slicing | bitwise-operator | memory-management | set | destructor | name-mangling | generators-in-python | assert | identity-operator | round | exception | installation | memory | arithmetic-expression | list-comprehension | gil | namespace | generators | match | mutable | formal-and-actual-parameter | input | list | file_handling | max-min | lambdas | format | list-vs-tuple | software-design | attribute | range | lambda-function | operand | raise | string-manipulation | error-handling | operations | zip | virtual-environment | staticmethod | math | numeric | postfix | functional-programming | multiprocessing | python_version | operators | complex ...