You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a hard time following instructions for day 9. Dictionaries are unsorted. So printing out the nth dictionary entry doesn't make sense to me. Since the dictionary is in alphabetical order in data.py, I assumed this means that is the "order" the instructions are referring to. So I generated a new dictionary with the index as the key.
However, the last instruction says to replace the key in the nth position of the dictionary with the value from the nth position in the list. However, that would create a duplicate key in the dictionary and doesn't work.
Please let me know if I'm completely missing something here!
Thanks very much!
-Blake
The text was updated successfully, but these errors were encountered:
Firstly, correct! Dictionaries are unsorted, so the idea is to intentionally sort this dict by key and then grab the nth key/value as per the instructions. Even though data.py is "sorted" in alphabetical key order, there's no guarantee that's the order you'll get when parsing it.
As for swapping the nth dict key with the nth list value... I've been over zealous so thank you (seriously) for raising this as an issue! I'm going to strip that out of the readme for now.
We're working on an additional Bite to add in for this which should make up for my oversight.
Keeping this issue open while we work on the Bite.
Hi Blake! Check out the readme now. We've left the manual steps but have created a new Bite on the codechalleng.es platform that's a good (better) replacement.
Hey there,
Having a hard time following instructions for day 9. Dictionaries are unsorted. So printing out the nth dictionary entry doesn't make sense to me. Since the dictionary is in alphabetical order in data.py, I assumed this means that is the "order" the instructions are referring to. So I generated a new dictionary with the index as the key.
However, the last instruction says to replace the key in the nth position of the dictionary with the value from the nth position in the list. However, that would create a duplicate key in the dictionary and doesn't work.
Please let me know if I'm completely missing something here!
Thanks very much!
-Blake
The text was updated successfully, but these errors were encountered: