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