Re: [Tutor] dictionary of lists

2015-06-04 Thread Chris Stinemetz
On Thu, Jun 4, 2015 at 2:30 AM, Peter Otten <__pete...@web.de> wrote: > Chris Stinemetz wrote: > >> Although I am certain it is not very efficient I was able to >> accomplish what I wanted with the following code I wrote: >> >> import os >> import pprint >> import csv >> from collections import def

Re: [Tutor] dictionary of lists

2015-06-04 Thread Peter Otten
Chris Stinemetz wrote: > Although I am certain it is not very efficient I was able to > accomplish what I wanted with the following code I wrote: > > import os > import pprint > import csv > from collections import defaultdict > > print_map = {'MOU':0, 'Call_Att':1, 'Device':2} > header = ['IME

Re: [Tutor] dictionary of lists

2015-06-03 Thread Chris Stinemetz
> >> Resetting execution engine >> Running >> C:\Users\cs062x\Desktop\python\projects\PanHandle\PanHandle\PanHandle.py >> The Python REPL process has exited > > > That's slightly unusual. How are you running this? > I am running it with Microsoft Visual Studio Community 2013 using Python Tools for

Re: [Tutor] dictionary of lists

2015-06-03 Thread Alan Gauld
On 03/06/15 17:39, Chris Stinemetz wrote: I am trying to create a dictionary of lists as I read a file. I envision it looking like: {key: [float_type],[string_type]} Thats not a dictionary of lists. You maybe mean: {key: [[float_type],[string_type]]} Which is a dictionary of lists of lists?

[Tutor] dictionary of lists

2015-06-03 Thread Chris Stinemetz
I am trying to create a dictionary of lists as I read a file. I envision it looking like: {key: [float_type],[string_type]} For the first item in the list I am trying to add the value to the existing value where the key matches but I am getting the following error: Resetting execution engine Runn