Level 1 : What does the following output?


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

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