I have a .txt file that contains lines of text like this:

> 
> Godbals NO LO -1 -1 1 1 1 -1 -1 1 1 1 1 1 1 1 -1 1 1 1 -1 1 1 1 1 1 -1
>  1 -1 -1 1 1 1 1 1 1 0 0 1 -1 -1 1 -1 1 -1 1 1 -1
> 
> 
> 

My task is to define a procedure that returns a dictionary who's keys are the first element of the lines of text i.e 'Godbals' and the values are the series of -1,1,0. 

I have imported this file via the open method and assigned it to the variable strlist

This is the piece of code i have written;

```
def create_voting_dict(strlist):
    D = {} 
    splitlist = [k.split() for  k in strlist]
    for i in range(len(strlist)):
        intlist = [int(j) for j in splitlist[i][3:]]
        D.update({splitlist[i][0]:None })
        for p in intlist:
            D[splitlist[i][0]] = p
    return D

```

This returns this dictionary;

```
{'Cornyn': 1, 'McConnell': 1, 'Bingaman': -1, 'Talent': 1, 'Cochran': 1, 'Craig': -1, 'Lugar': 1, 'Clinton': 1, 'Domenici': 1, 'Rockefeller': -1, 'Gregg': 1, 'Lautenberg': -1, 'Chambliss': 1, 'Voinovich': -1, 'Murkowski': 1, 'Levin': -1, 'Pryor': 1, 'Martinez': 1, 'Harkin': -1, 'Johnson': 1, 'Bayh': -1, 'Byrd': -1, 'Coburn': 1, 'Bunning': 1, 'Reid': -1, 'Kennedy': -1, 'Shelby': 0, 'Sarbanes': -1, 'Bond': 1, 'Nelson1': 1, 'Dole': 1, 'Coleman': 1, 'Dorgan': -1, 'Durbin': -1, 'Reed': -1, 'Landrieu': 1, 'Schumer': 1, 'Santorum': 1, 'Snowe': 1, 'Lieberman': -1, 'Hutchison': 1, 'Lincoln': 1, 'DeMint': 1, 'Isakson': 1, 'Inhofe': 1, 'Dodd': -1, 'DeWine': 1, 'Frist': 1, 'Bennett': 1, 'Smith': 1, 'Thomas': 1, 'Enzi': 1, 'Thune': 1, 'Burr': -1, 'Boxer': -1, 'Allen': 1, 'Nelson2': 1, 'Kerry': -1, 'Murray': -1, 'Burns': 1, 'Allard': 1, 'Salazar': 1, 'Jeffords': -1, 'Akaka': -1, 'Sununu': 1, 'Biden': -1, 'Obama': -1, 'Cantwell': 1, 'Roberts': 1, 'Alexander': 1, 'McCain': 1, 'Collins': 1, 'Inouye': -1, 'Lott': 0, 'Feingold': -1, 'Kyl': 1, 'Feinstein': 1, 'Kohl': -1, 'Specter': 1, 'Stevens': 1, 'Ensign': 1, 'Carper': 1, 'Hatch': 1, 'Vitter': 1, 'Baucus': 1, 'Graham': 1, 'Grassley': 1, 'Wyden': -1, 'Hagel': 1, 'Dayton': 1, 'Mikulski': -1, 'Stabenow': 1, 'Leahy': -1, 'Sessions': 1, 'Crapo': 1, 'Conrad': -1, 'Warner': 1, 'Chafee': -1, 'Brownback': 1}

```

I see how my code is flawed, i'd like to find a way to iteratively append the -1,0,1's to the values of the elements of the dictionary... or something like that.