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