Level 9 : What will be the output of the below python code


['f', 't'][bool('spam')]

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