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


try: 
     if '1' != 1:
         raise"some error"
     else: 
        print("some error has not occurred")
except "someError":
    print("someError has occured")

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