Level 10 : 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 | 1736+ Python FAQs | Share
integer | join | parameter | math | comment | identity-operator | inherit | methods | regex | slice | frozenset | sys | global-variable | invalid-list | return-statement | identifier | pep | control-flow | round | class-and-instance-variable | oop | random-function | counter | logical-operator | data-structure | tuple-unpacking | input-function | class-and-inheritance | import-method | int | arithmetic-operation | boolean-and-non-boolean | encapsulation | built-in-function | loop | higher-order-function | overflow | expand-tab | data-type | operators | lists | oops | design-principle | gil | feature | interpreter | random | mapping-function | deep-copy | namespace | copy | python_version | exception | python-history | filter | print | dictionary | asyncio | string-formatting | list-mutation | conditional-statement | global-keyword | center | split | string-formatting | head-and-tail | constructor | stack | loop-control | sum() | min-function | def | assignment-operator | string-manipulation | indexing | function-argument | input-function | memory | list-join | global-variable | software-design | regular-expression | goto-function | inheritance | assert | sorted | recurssion | functional-programming | python-django | list-vs-tuple | identity-operator | recursion | iterable | built-in-function | data_structure | compute | append | benefit | operand | precedence | zip | binary-operation | id-function | data-type | conversion | function-and-scope | functions | attribute | sorting | operator | collections | decimal | tuple | comprehension | encoding | datatype | postfix | numpy | scientific-notation | string-concatenation | list-comprehension | range | docstring | file-handling | boolean | name-mangling | conditional-statement | with-statement | match | binary | lambda | format | complex | collection | debugging | string-slicing | type-conversion | multiprocessing | descriptors | installation | numeric | odd-number | exception-handling | python | method | built-in | exception-handling | while-else-loop | implementation | rollback | counter-function | string | choice | generator | async | print-statement | variable | formal-and-actual-parameter | magic-method | complex-number | list-comprehension | precedence-and-associativity | condition | error-handling | classes | polymorphism | slicing | yield | objects | syntax-error | statement | filter-function | syntax-error | exponentiation | __init_subclass__ | __all__-attribute | context-manager | bitwise | max-min | sys-module | multiple-inheritance | iterator | thread | asyncio-module | function | enumerate() | operator-and | list-slicing | destructor | datetime | pandas | lambda-function | matplotlib | generators | file-handling | global | control-flow | list-operation | loops | command-line-parsing | static-method | shallow-copy | init | for | generators-in-python | string-method | nested-loop | control-statement | factorial-function | __future__ | default-mutable-argument | data-structure | input | heap-memory | dictionaries | keyword | memory-management | class | python-module | matrix | pseudocode | application | min-max-function | raise | decorator | operator-or | swapping | type_conversion | virtual-environment | math-copysign | floating-point-precision | set-operation | bitwise-operator | matrix-list-comprehension | class-and-object | update | file | version | zfill-function | namedtuple | turtle | map-function | escape-operator | dicts | module | zip-function | multithreading | array | object-attribute | fabs-function | list-indexing | bitwise-operator | library | touples | version-check | python-repl | round-function | else-statement | string-slicing | string-method | error | indentation | mutable | string-iteration | file_handling | comparison | mysql | list-method | immutability | operations | mathematical-function | basic | typeerror | access-modifier | operator-overloading | sum-function | syntaxerror | mathematics | pickling-&-unpickling | package-management | call | while-and-for-loop | expression | virtual-environment | immutable-data-type | lambdas | logical-operation | set | data-structures | while-loop | syntax | threading | staticmethod | arithmetic-expression | list | type-conversion | logical-operator ...