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