Monday, 4 May 2020

How to duplicate the same list in dict?

folder_list = [str(i) for i in range(62)] #lazy_hack
label_dict = dict(zip(folder_list,range(0,len(folder_list))))


(Pdb) folder_list
['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61']

(Pdb) label_dict
{'60': 60, '40': 40, '20': 20, '27': 27, '54': 54, '30': 30, '24': 24, '50': 50, '55': 55, '7': 7, '21': 21, '49': 49, '0': 0, '57': 57, '26': 26, '35': 35, '41': 41, '5': 5, '15': 15, '33': 33, '16': 16, '31': 31, '46': 46, '17': 17, '25': 25, '56': 56, '37': 37, '3': 3, '58': 58, '51': 51, '53': 53, '13': 13, '32': 32, '29': 29, '44': 44, '1': 1, '43': 43, '38': 38, '59': 59, '14': 14, '34': 34, '2': 2, '9': 9, '10': 10, '39': 39, '47': 47, '48': 48, '4': 4, '6': 6, '8': 8, '23': 23, '22': 22, '45': 45, '42': 42, '18': 18, '11': 11, '28': 28, '61': 61, '12': 12, '36': 36, '52': 52, '19': 19}

(Pdb)

No comments:

Post a Comment