Re: write to a file two dict()

2012-09-24 Thread inq1ltd
On Sunday, September 23, 2012 10:44:30 AM giuseppe.amatu...@gmail.com wrote: Hi Have two dict() of the same length and i want print them to a common file. a={1: 1, 2: 2, 3: 3} b={1: 11, 2: 22, 3: 33} in order to obtain 1 1 1 11 2 2 2 22 3 3 3 33 I tried output =

write to a file two dict()

2012-09-23 Thread giuseppe . amatulli
Hi Have two dict() of the same length and i want print them to a common file. a={1: 1, 2: 2, 3: 3} b={1: 11, 2: 22, 3: 33} in order to obtain 1 1 1 11 2 2 2 22 3 3 3 33 I tried output = open(dst_file, w) for (a), b , (c) , d in a.items() , b.items() : output.write(%i %i %i %i\n %

Re: write to a file two dict()

2012-09-23 Thread MRAB
On 2012-09-23 18:44, giuseppe.amatu...@gmail.com wrote: Hi Have two dict() of the same length and i want print them to a common file. a={1: 1, 2: 2, 3: 3} b={1: 11, 2: 22, 3: 33} in order to obtain 1 1 1 11 2 2 2 22 3 3 3 33 I tried output = open(dst_file, w) for (a), b , (c) , d in

Re: write to a file two dict()

2012-09-23 Thread 88888 Dihedral
giuseppe...@gmail.com於 2012年9月24日星期一UTC+8上午1時44分30秒寫道: Hi Have two dict() of the same length and i want print them to a common file. a={1: 1, 2: 2, 3: 3} b={1: 11, 2: 22, 3: 33} in order to obtain 1 1 1 11 2 2 2 22 3 3 3 33 I tried output =