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