Re: Dictionary error

2014-11-25 Thread Dave Angel
On 11/25/2014 04:34 AM, Thuruv V wrote: Please Clarify the 'TypeError: zip argument #1 must support iteration' import openpyxl book = openpyxl.load_workbook('c:/users/c_thv/desktop/tax.xlsx') sheet = book.get_sheet_by_name('Thilip') cell = sheet.cell(row=2,column = 4) i = 2 x = [] y = []while

Re: Dictionary error

2014-11-25 Thread John Gordon
In Thuruv V writes: > Please Clarify the 'TypeError: zip argument #1 must support iteration' > import openpyxl > book = openpyxl.load_workbook('c:/users/c_thv/desktop/tax.xlsx') > sheet = book.get_sheet_by_name('Thilip') > cell = sheet.cell(row=2,column = 4) > i = 2 > x = [] > y = []while i

Re: Dictionary error

2014-11-25 Thread Steven D'Aprano
Thuruv V wrote: > Please Clarify the 'TypeError: zip argument #1 must support iteration' Try it at the interactive interpreter: py> zip('abc', [1, 2, 3]) # works fine [('a', 1), ('b', 2), ('c', 3)] But: py> zip(1000, [1, 2, 3]) # fails Traceback (most recent call last): File "", line 1, i

Re: dictionary error: list assignment index out of range

2011-01-28 Thread Octavian Rasnita
From: Vaduvoiu Tiberiu > Well, to quote firefox: this is embarrassing. I've realized the dictionary initialization is wrong, as [] means its a tuple, I should use {}. That's why I > don't like working nights..it's only in the morning when you start seeing things better. I apologize for the ma

Re: dictionary error: list assignment index out of range

2011-01-27 Thread Vaduvoiu Tiberiu
Well, to quote firefox: this is embarrassing. I've realized the dictionary initialization is wrong, as [] means its a tuple, I should use {}. That's why I don't like working nights..it's only in the morning when you start seeing things better. I apologize for the mail. Cheers _