Open swimmer2020 opened 4 years ago
this is my code:
filedata = database.read() database.close() newdata=filedata.replace(userStuff[0]+" "+userStuff[1]+" "+userStuff[2]+userStuff[0]+" "+userStuff[1]+" "+str(player1score)) database=open("usernames","w") database.write(newdata)
It comes up with the error: TypeError: replace() takes at least 3 arguments (2 given)
Why?
this is my code:
replacing the old high score with their new high score
filedata = database.read() database.close() newdata=filedata.replace(userStuff[0]+" "+userStuff[1]+" "+userStuff[2]+userStuff[0]+" "+userStuff[1]+" "+str(player1score)) database=open("usernames","w") database.write(newdata)
It comes up with the error: TypeError: replace() takes at least 3 arguments (2 given)
Why?