Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Use spoiler flag next time.
This comment is hidden because it contains spoiler information about the solution
When creating large dictionaries, I use Excel.
Example:
A1 = key, B1 = : , C1 = value
Copy for each set (next set would be in row 2, then 3 and so on)
D1 = CONCAT(A1,B1,CHAR(34),C1,CHAR(34),IF(D2="","",","))
---Hold the bottom right corner of D1 and drag down to Auto-Fill (in my example, drag to D5)
---result is key:"value" if the cell below is empty, otherwise it will be key:"value",
---CHAR(34) is for the quotes
Code=CONCAT(A1,B1,CHAR(34),C1,CHAR(34),IF(D2="","",","))
Example= key + : + " + value + " + (if cell below is empty: "" else ",") = key:"value",
E1 = CONCAT("{",D1:D5,"}") #D5 would be my last row
result = {key:"value",key:"value",key:"value"...}
Keep the sheet and re-use for other dictionaries. Just update the D1:D5 range.
Let me show you for this kata:
A1 = 1, B1 = : C1 = "kiwi" and so on...
result={1:"kiwi",2:"pear",3:"kiwi",4:"banana",5:"melon"}
Thanks. After I read this, I knew exactly what to do!