Jul-24-2017, 10:57 PM
Hello Python Experts,
I was trying to arrange a file in python. If someone can help, that would be great.
My file:
[ Heading 1]
Line 1
Line 2
Line 3
[Heading 2]
Line 1
Line 2
Line 3
[Heading 1]
Line 1
Line 2
Objective: I need to put everything that belongs to heading 1 under a common heading (the second heading 1 should be gone and its contents should be copied under the first heading 1].
This seems fairly simple but can't find a way to figure out. Any help is highly appreciated.
I was trying to arrange a file in python. If someone can help, that would be great.
My file:
[ Heading 1]
Line 1
Line 2
Line 3
[Heading 2]
Line 1
Line 2
Line 3
[Heading 1]
Line 1
Line 2
Objective: I need to put everything that belongs to heading 1 under a common heading (the second heading 1 should be gone and its contents should be copied under the first heading 1].
This seems fairly simple but can't find a way to figure out. Any help is highly appreciated.