Level 1 : What will be the output of the following code?


a = 10
b = 5
c = a > b and b < a or a == b
print(c)

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