Re: Fwd: Text Strip() now working constantly.

2018-01-28 Thread Chris Angelico
On Mon, Jan 29, 2018 at 1:07 AM, Steven D'Aprano wrote: > On Sat, 27 Jan 2018 11:25:35 -0600, George Shen wrote: > >> I have attached a JPG that clearly illustrate the issue. > [...] >> Please see the JPG. > > And what of us who are blind or visually impaired and use a screen reader > to read text

Re: Fwd: Text Strip() now working constantly.

2018-01-28 Thread Steven D'Aprano
On Sat, 27 Jan 2018 11:25:35 -0600, George Shen wrote: > I have attached a JPG that clearly illustrate the issue. [...] > Please see the JPG. And what of us who are blind or visually impaired and use a screen reader to read text? Unless you use Photoshop to edit your source code, why are you us

Re: Text Strip() now working constantly.

2018-01-27 Thread Chris Angelico
On Sun, Jan 28, 2018 at 5:46 AM, wrote: > Hi, I'm a begginer in Python, i have a question... > > can we use replace method to do it. > > E.g. a='cm_text.data' > a.replace('.data', ''), this will return output as 'cm_text'. Yep! That works too. Be aware, though, that it might replace ".data"

Re: Text Strip() now working constantly.

2018-01-27 Thread nasirahamed40719
Hi, I'm a begginer in Python, i have a question... can we use replace method to do it. E.g. a='cm_text.data' a.replace('.data', ''), this will return output as 'cm_text'. -- https://mail.python.org/mailman/listinfo/python-list

Re: Text Strip() now working constantly.

2018-01-27 Thread Chris Angelico
On Sun, Jan 28, 2018 at 4:25 AM, George Shen wrote: > Hi Python Group, > > I am not sure if I am doing this correctly however, I believe I found a bug > that involves the striping of a text string. If you're implying that it's a bug in Python, no it isn't. If you're trying to understand the bug i

Fwd: Text Strip() now working constantly.

2018-01-27 Thread George Shen
Hi Python Group, I am not sure if I am doing this correctly however, I believe I found a bug that involves the striping of a text string. I have attached a JPG that clearly illustrate the issue. I am currently using 2.7.13 In short: Given a string. 'cm_text.data' if you try and strip '.data' th