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