Published
- 1 min read
write string to file python
The solution for this is noted below
write string to file python
Solution
price = 33.3
with open("Output.txt", "w") as text_file:
text_file.write("Purchase Amount: %s price %f" % (TotalAmount, price))
Try other methods by searching on the site. That is if this doesn’t work