0
Could we not use natural numbers as key in dictionary functions?
It is written that mutable values could not be used as key in dictionary function . please do tell what are the mutable values . Is integer and alphabets included in it too?
4 Respostas
+ 2
Yes we can
+ 1
Mutable means you can change it internally. You cannot change the number 5. It is just plain number. Nothing in there to change. Objects you create are usually mutable. You can change their contents. Hope that helps.
0
thanks all of you
- 1
Yes you can consider the immutables as constants they are just what they are. But lists and variables you can change by assigning new values to them