I am a python beginner.
I have a large txt file in the following format, made of many one sentence paragraphs:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
****
Sed id placerat magna.
*******
Pellentesque in ex ac urna tincidunt tristique.
Etiam dapibus faucibus gravida.
I am trying to get output as only the paragraphs following the asterisks paragraph [ minimum 4 asterisks per asterisks paragraph ].
The output I need:
Sed id placerat magna.
Pellentesque in ex ac urna tincidunt tristique.
I was trying something like this, but I have no idea A] how to set the minimum 4 asterisks per asterisks paragraph and B] how to set the paragraph after the asterisks paragraph.
import re
article_content = [open('text.txt').read() ]
after_asterisk_article_paragraph = []
string = "****"
after_asterisk_article_paragraph = string[string.find("****")+4:]
print(*after_asterisk_article_paragraph, sep='\n\n')
Again, I am just starting Python so please excuse me.