Working on outputting text and variables to a .txt file through python. And it doesn't work.
f=open("Output.txt", "a")
f.write("Number Plate:", np ,"\n")
f.write("Valid:", valid ,"\n")
f.write("Speed:", speed ,"\n")
f.write("Ticket:", ticket ,"\n")
f.wrtie("Ticket Price:", ticketprice ,"\n")
f.write("\n")
f.close()
This is the error that is given when i run it.
f.write("Number Plate:", np ,"\n")
TypeError: write() takes exactly one argument (3 given)
Any help is greatly appreciated
f.write("Number Plate:", np ,"\n")what isnp?writefunction at docs.python.org/3/tutorial/inputoutput.html.