Level 1 : What will be the output of the following code?


d = {True: 'Yes', 1: 'No', 1.0: 'Maybe'}
print(d)

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