I have a really weird python problem. I have already asked several colleagues who all had no idea how it happened and how it could be solved.
I have a shallow dict of strings that I receive from an API call and I want to assign some of those values to a new dict.
This is what the first dict looks like. Just a bunch of strings:
I assign some values from dict1 to some keys in dict2. Really basic
dict2={}
dict2['access_key'] = dict1['access_key']
dict2['secret_access_key'] = dict1['secret_access_key'],
dict2['session_token'] =dict1['session_token'],
dict2['region'] = dict1['region']
Then this happens. The values for "secret access key" and "session_token" are turned into tuples. "access_key" and "region" remain strings
I have already tried initialising the values as strings, accessing the first entry of the tuple and casting the value to a string. All of that did not change anything. It seems like the value is assigned just fine and then something weird happens that turns it into a tuple
This is a screenshot of my Interpreter settings. I am using Pyython 3.6
I am really going crazy over this one :-/ Any help would be greatly appreciated