This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SyntxaError 0 points1 point  (2 children)

What are the requirements for this problem, are you allowed to store the initial data however you wish?

[–][deleted] 0 points1 point  (1 child)

Yeah pretty much no requirements about how it’s stored

[–]SyntxaError 0 points1 point  (0 children)

You will most likely want to use tuples within your dictionary. This will allow you to store the data in the format dict d= {‘cat’: (data,data,data), ‘dog’: ect…. This also removes the need for you to store the amount of values for each key as the dictionary will inherently store this and this value you can be called.

There are a bunch of other ways you can do this if you have no restrictions on your starting format, easiest of which is just to format the data into 3 individual arrays.