Python TypeError for Adding Variable in Parenthesis
11:19 10 Mar 2026

I'm currently dealing with this line of code error as a newbie. Any advice?

with open("habit tracker count.txt","a") as habit:
    if user_input=="yes":
        habit.write("\nCompleted ", response)
    elif user_input=="no":
        habit.write("\nDid not complete ",response)

habit.write("\nCompleted ",response)

~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^

TypeError: TextIOWrapper.write() takes exactly one argument (2 given)

python