Re: [Tutor] how to iterate through a dictionary and assign list values?

2013-12-04 Thread Asokan Pichai
On Thu, Dec 5, 2013 at 9:43 AM, Jared Nielsen wrote: > I want to create a dictionary, assign it keys, then iterate through a for > loop and assign the dictionary values from a list. I'm trying this, but > it's not working: > > dictionary = {"one", "two", "three"} > This creates a set. and NOT a di

Re: [Tutor] how to iterate through a dictionary and assign list values?

2013-12-04 Thread Danny Yoo
On Wed, Dec 4, 2013 at 8:13 PM, Jared Nielsen wrote: > I want to create a dictionary, assign it keys, then iterate through a for > loop and assign the dictionary values from a list. I'm trying this, but > it's not working: > > dictionary = {"one", "two", "three"} > list = [1,2,3] > > Hi Jared, 'd

[Tutor] how to iterate through a dictionary and assign list values?

2013-12-04 Thread Jared Nielsen
I want to create a dictionary, assign it keys, then iterate through a for loop and assign the dictionary values from a list. I'm trying this, but it's not working: dictionary = {"one", "two", "three"} list = [1,2,3] for key in dictionary: for value in list: dictionary[key] = value I