def update_task(task_num,index,edit): with open("tasks.txt", "r+") as user_task: task_file = user_task.readlines() task_list = task_file