Action unknown: backlinkmenuitem

استفاده از داده ساختارهای ایموتبل در کلیدهای دیکشنری

# You can't use a list as a dict key in python because it's mutable
mydict = {[1, 2, 3]: 'Masoud', 'position': 'teacher', 'age': '24'}  # this line of code have an error!

# But these lines of code are Ok:
mydict = {(1, 2, 3): [1, 2, 3], 'position': 'teacher', 'age': '24', 'age': 25}
mydict = {'name': 'Masoud', 'position': 'teacher', 'age': '24', 'age': 25}