I’m trying to create a notepad on python, with the ability to create an account, log in to that account, create notes, view notes, and edit notes. I know how to append to a specific line in a file by detecting a specific string, but that didn’t work for appending user-generated input to user-generated data in a file. The output should be adding new data onto a specific line, then being able to access it later.
projectnum = int(input(“What line to you want to edit? : “)
user_input = input(“Type what you want to add”)
f = open(user+”.txt”,”a”)
f.write(user_input)
# then I don't know what to do here to specify the line.