I have a function that I want to use to delete a set of lines in a file called Schedule.txt. I want it to delete 6 lines in total, with an input at the beginning, asking the user which time to delete, which is the first out of six lines. This is as far as I've got. If anyone can help me to delete the 6 lines, please answer!
def delete ():
train = int(input("Enter the train time that you want to remove: "))
file = open("Schedule.txt", "r")
file.read("| Train: "+train)