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