I have a long list of items that I am trying to assign to one value in a dictionary.
Here is my code:
TSE_debt = ('21','22','23','24','25','26','27','31','32','33','34','35','36','39','3A','51','52','53','54','55','56',
'62','63','64','65','66','67','81','82','83','84','85','91','93','94','95','96')
my_dict = {
{future for future in TSE_debt: 'hello'} }
Let's say I want to assign each of the strings in TSE_debt
to the string hello
- how can I achieve this?
Desired output:
{'21': 'hello', '22': 'hello', '23':'hello', ...}
Addendum:
TSE_equities = ('01', '02', '03', '04', '05', '06', '07', '08', '09', '0A', '11', '12', '13', '17')
TSE_debt = ('21','22','23','24','25','26','27','31','32','33','34','35','36','39','3A','51','52','53','54','55','56',
'62','63','64','65','66','67','81','82','83','84','85','91','93','94','95','96')
TSE_entitlements = ('3F', 'BB')
TSE_futures = ('A1','A2','A6','A8','A9','AA','C1')
TSE_other = ('B1','B2','B3','B4','B5','BA')
SECURITY_TYPE_CODE_TO_INSTRUMENT_TYPE = {
equity : InstrumentTypes.EQUITY for equity in TSE_equities,
debt : InstrumentTypes.DEBT for debt in TSE_debt,
entitlement : InstrumentTypes.ENTITLEMENTS for entitlement in TSE_entitlements,
future : InstrumentTypes.FUTURES for future in TSE_futures,
other : InstrumentTypes.OTHER for other in TSE_other}