Level 9 : What output will be generated by this specific code?


try:print(1)
except:print(2)
finally:print(3)

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