Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to write the condition for deleting multiple lines?
Post: RE: How to write the condition for deleting multip...

(Jul-10-2022, 02:27 PM)Lky Wrote: (Jul-10-2022, 02:25 PM)jcrubaugh45 Wrote: What are you expecting the user to input ? the number of the question ? or the matching text of the full question they w...
Lky General Coding Help 3 1,100 Jul-10-2022, 02:28 PM
    Thread: How to write the condition for deleting multiple lines?
Post: RE: How to write the condition for deleting multip...

(Jul-10-2022, 02:25 PM)jcrubaugh45 Wrote: (Jul-10-2022, 05:36 AM)Lky Wrote: Does anyone know how to delete lines in txt file according to user input without using any list or dictionary? For exam...
Lky General Coding Help 3 1,100 Jul-10-2022, 02:27 PM
    Thread: How to write the condition for deleting multiple lines?
Post: How to write the condition for deleting multiple l...

Does anyone know how to delete lines in txt file according to user input without using any list or dictionary? For example content inside txt file: Question 1 Which is correct? A. X B. XX C. XXX D. X...
Lky General Coding Help 3 1,100 Jul-10-2022, 05:36 AM
    Thread: Delete multiple lines from txt file
Post: RE: Delete multiple lines from txt file

(Jul-10-2022, 12:09 AM)jcrubaugh45 Wrote: def remove_lines_list (file): ip_list = open(file).readlines() return [address.rstrip('\n') for address in ip_list]I use this function to take a lis...
Lky General Coding Help 6 2,204 Jul-10-2022, 05:33 AM
    Thread: Delete multiple lines from txt file
Post: RE: Delete multiple lines from txt file

(Jul-09-2022, 06:00 PM)ibreeden Wrote: The best way to do this is: Copy the lines of the original file to a temporary file, but don't copy the lines you do not want. If no errors occurred: remove t...
Lky General Coding Help 6 2,204 Jul-10-2022, 05:32 AM
    Thread: Delete multiple lines from txt file
Post: Delete multiple lines from txt file

Does anyone know how to delete lines in txt file according to user input without using any list or dictionary? For example content inside txt file: Question 1 Which is correct? A. X B. XX C. XXX D. X...
Lky General Coding Help 6 2,204 Jul-09-2022, 04:43 PM

User Panel Messages

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