I am creating a Python script that asks for input from the command line. The user will have the ability to edit a part of a file. I can ask for the new information and overw
You should just have 2 variables: one for standard string, one for string that will user change by itself. Like:
str1 = 'String that is standard'
str2 = str1 #it usually will be standard string
usr = input('your text goes here')
if len(usr) != 0:
str2 = usr
#and here goes code for writing string into file