Level 1 : What is output of the following code?


x = 100
y = 50
print(x and y)

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