I wrote python code to write to a file like this:
with codecs.open("wrtieToThisFile.txt",'w','utf-8') as outputFile:
for k,v in list1:
outputFile.write(k + "\n")
The list1 is of type (char,int) The problem here is that when I execute this, file doesn't get separated by "\n" as expected. Any idea what is the problem here ? I think it is because of the
with
Any help is appreciated. Thanks in advance. (I am using Python 3.4 with "Python Tools for Visual Studio" version 2.2)