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