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