How can i delete some components of the file | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

How can i delete some components of the file

Imagine that i have file which contains the following sentences : "hello world" "hello python" How can i delete a sentence ?

17th Aug 2017, 11:49 AM
kazuto
1 Réponse
+ 1
erm...read the file, then open in write mode and write only the lines you want to keep back to it?
17th Aug 2017, 5:20 PM
Ralph Landon
Ralph Landon - avatar