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