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