0
Hello, guys, I’m a beginner in Python. I’m learning alone and I’ve done some programs, which is pretty cool. But I’m trying to make a new program and I’m not getting it. Here’s the thing:
I have a long text, like:
'''
Meu nome é João.
Eu moro no Brasil. Eu tenho nível superior...
'''
Therefore, I wish to collect or print a few words or phrases.
The text is very long and, as I read, I discover the sentences I want. So, I thought I’d mark the desired phrase, like, starting and ending with '**':
'''
Meu nome é **João**.
Eu **moro no Brasil**.
Eu tenho **nível superior**...
'''
Once this is done, I want to collect/print every sentence that starts and ends with '**': like:
'João'
'moro no Brasil'
'nível superior'
...
How can I do that?
can do a . split(' n'), this will cut your str at the end-of-line points, and return in list format
– Elton Nunes
Elton Nunes, thank you very much for the tip of the line break. Thus, I managed to isolate the desired stretches.
– douglas1alc