I want to create a dictionary that stores the full name of the 50 states in the word, and the abbreviations in the value, given a list of the names and abbreviations. I am expecting a dictionary like {'Alabama' : 'AK', 'Alaska': 'AL', ...}. I've tried
state_to_abbrev = {} for word in states: for i in range(50): state_to_abbrev[word] = states[i] state_to_abbrev[word] = abbreviations[i] state_to_abbrev And I'm getting {'Alabama': 'WY', 'Alaska': 'WY', 'Arizona': 'WY', 'Arkansas': 'WY', 'California': 'WY', 'Colorado': 'WY', 'Connecticut': 'WY', 'Delaware': 'WY', 'Florida': 'WY', 'Georgia': 'WY', 'Hawaii': 'WY', .....}
abbreviationsis what you expect.