Ciao, vorrei sapere come poter cancellare determinate righe di un file txt indicandole con un indice (es. riga1,2...)

grazie x l'eventuale risposta