Level 1 : What is the output of the following code?


x= (1,2, [3,4], (5), {6,7,8})
print(x[3])

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