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