kumar s via Tutor wrote:
> Hi group, I am trying to substitute in the following way and i cannot.
> Could you point out whats wrong in what i am doing.
>
z'.|D'
re.sub(z,'1',z)'111'
> I just want only '1' and not '111'.
> I want:>>> re.sub(z,'1',z)'1'
> re.sub is repeatedly inserting 3
Hi group, I am trying to substitute in the following way and i cannot. Could
you point out whats wrong in what i am doing.
>>> z'.|D'
>>> re.sub(z,'1',z)'111'
I just want only '1' and not '111'.
I want:>>> re.sub(z,'1',z)'1'
re.sub is repeatedly inserting 3 times because z has .|D . How can I