Level 1 : What does the following output?


print(bool(0), bool([]), bool({}), bool(""))

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