[Tutor] Remove some known text around text I need to keep

Alan Gauld alan.gauld at yahoo.co.uk
Wed Jan 29 18:30:38 EST 2020


On 29/01/2020 22:05, DL Neil via Tutor wrote:
>>>> [SINTOMO: paziente sintomatica per dispnea moderata]
>>>> [SEGNO: Non edemi]
>>>> [SEGNO: calo di 2 kg (55,8 kg)]
>>>> [TERAPIA: ha ridotto la terapia diuretica]
>>>
>>>> the same lines as above what I need to write back in the new “clean”
>>> files are like the following:
>>>
>>>> paziente sintomatica per dispnea moderata]
>>>> Non edemi]
>>>> calo di 2 kg (55,8 kg)]
>>>> ha ridotto la terapia diuretica]

> Some call it "pedantry", others "attention to detail" but don't forget 
> the closing square-bracket!

Although, looking at the OPs original post, he retained the closing
bracket...
But I think he did intend to remove them...
So either a slice, or better, rstrip('] ') will deal with those.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list