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