好吧,众所周知,我正在尝试收集 x,y 坐标,并且我正在研究保存功能以将 x,y 保存到文本文件中。这是我得到的
x1 = raw_input("What is x1: ")
y1 = raw_input("What is y1: ")
x2 = raw_input("what is x2: ")
y2 = raw_input("what is y2: ")
outFile = open("c:\\users\zilvarael\Desktop\coord_man.txt", "wt")
outFile.write("Coordinate file: \n", x1, y1, "\n", x2, y2)
这是我面临的错误:
outFile.write("Coordinate file: \n", x1, y1, "\n", x2, y2)
TypeError: function takes exactly 1 argument (6 given)
知道如何解决这个问题吗?