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