<snip> > I ask again. What did results look like when you print it out. I'm > referring to the argument to writeonefiledata(). > >> def writeonefiledata(outname,**results): >> > put the lines here: > print ("results is: ", results) > print("repr is:", repr(results))
$ python3 counter-vertically-v2.py results is: {'B': [0, 0, 0, 0, 0, 0], 'E': [2, 1, 4, 0, 1, 0]} repr is: {'B': [0, 0, 0, 0, 0, 0], 'E': [2, 1, 4, 0, 1, 0]} > > outfile = open(outname,"w") >> for item in results: >> return outfile.write(item) >> >> This final part I made some mistakes? >> >> yes, you're iterating over the keys of a dictionary. Since it only has > the key "E", that's what you get. Try printing dir(results) to see what > methods might return something other than the key. Make the language work > for you. Sorry I am not smart. value? > > > DaveA > > -- Best Regards, lina
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor