Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Delete line of file
#2
For starters:
1. The resulting input variable will be a string -> line 2 -> 'Donnie Darko' is the value of a, so line 2 is superfluous
2. print ("+ a, successfully deleted!") -> is +a somehow the variable a , you want to print ?
3. The part of the code where you read the txt file is missing, pls add it.

Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
Delete line of file - by dionatandiego11 - Aug-05-2020, 02:27 PM
RE: Delete line of file - by DPaul - Aug-05-2020, 05:36 PM
RE: Delete line of file - by deanhystad - Aug-05-2020, 05:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  finding p's in words of a multi-line text file johneven 5 4,493 Jun-24-2019, 03:41 PM
Last Post: ThomasL
  reading text file and writing to an output file precedded by line numbers kannan 7 10,606 Dec-11-2018, 02:19 PM
Last Post: ichabod801
  Command line inputs not printing to Log File ijosefson 1 3,413 Oct-19-2017, 06:41 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020