Level 5 : What will be the output of the following code?


try: x = 1 / 0 except ZeroDivisionError:
print("Error")

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