Level 1 : What does the following output?


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

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