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


int1 = 10  
int2 = 6  
if int != int2:  
    int2 = ++int2  
    print(int1 - int2)

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