Apr-07-2020, 03:45 PM
How would you do that then? My example identifies a duplicate key but continues on and returns a dictionary. What change could you make to return (An empty dictionary? None?) instead of the partially constructed new_dict?
Dict from list - HELP! PLEASE!
|
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Input validation for nested dict and sorting list of tuples | ranbarr | 3 | 4,094 |
May-14-2021, 07:14 AM Last Post: perfringo |
|
List index out of range when turning CSV into dict | ranbarr | 15 | 7,001 |
May-12-2021, 10:38 AM Last Post: ranbarr |
|
Python Adding +1 to a list item cointained in a dict | ElReyZero | 1 | 2,188 |
Apr-30-2020, 05:12 AM Last Post: deanhystad |
|
maximum and minimum element from the list and return output in dict | MeeranRizvi | 1 | 3,845 |
Jan-02-2017, 02:12 PM Last Post: ichabod801 |