Level 9 : Identify the issue in the code below:


d = {[1, 2]: 'X', (3, 4): 'Y'}

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