[Solved] How to add new item to dictionary in loop using uniquely generated string based on index? (Python)
Your immediate problem is this: LDates[‘%s’ % (‘string%s'[‘Id’] % i)] I believe that you mean to access the variable you created earlier. That would require you to use: LDates[(globals()[‘string%s’ % i])[‘Id’]] But this whole thing is ill-advised. Why don’t you create a variable where you can access all the data by just passing in the … Read more