Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with group of lines
#2
Once again, you don't post Python code which is what we'd like to see! As a consequence I won't post Python code either, but here is a reasonable informal algorithm

Output:
prefix = empty for each line: if the prefix is empty or the line is empty: prefix = line print prefix and line
« We can solve any problem by introducing an extra level of indirection »
Reply


Messages In This Thread
Working with group of lines - by knob - May-21-2024, 03:29 AM
RE: Working with group of lines - by Gribouillis - May-21-2024, 07:21 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Iterate 2 large text files across lines and replace lines in second file medatib531 13 6,361 Aug-10-2020, 11:01 PM
Last Post: medatib531
  retrieve group of lines knob 1 1,640 Oct-28-2019, 07:02 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

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