The code is erroneous.
The error occurs in the line print(len(crates[box])). The key box is not a string but a dictionary, which is not a valid key type for a dictionary in Python. Dictionary keys must be of an immutable type, such as strings, numbers, or tuples containing only immutable types.
To fix the code, you should use the string 'box' as the key instead of the dictionary box
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
hovnival
3 months, 3 weeks agoFedeXD
6 months, 3 weeks agochristostz03
8 months ago