I want to write out to values into a file. I get the two values in different if
statement. How can I modify it to get the two values within the same output text file?
if row == 0 and col == 1:
print ertek
with open("Output.txt", "w") as kiiras:
kiiras.write("data1: %s" % ertek)
kiiras.write("\n")
if type(pattern_colour) is tuple and row == 2:
tipus = thecell.value
tipus = tipus.encode('ascii', 'ignore').decode('ascii')
print tipus
text_file = open("Output.txt", "w")
text_file.write("data2: %s" % tipus)