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