On Fri, 2 Jun 2023 at 02:27, David Mertz, Ph.D. <david.me...@gmail.com> wrote:
>
> It feels to me like "split on whitespace" or "remove whitespace" are
> quite common operations.  I've been frustrated a number of times by
> settling for the ASCII whitespace class when I really wanted the
> Unicode whitespace class.
>

They are indeed, quite common. It's a good thing Python makes those easy.

>>> len("\u2000spam\u2001".strip())
4
>>> "spam\u2002ham".split()
['spam', 'ham']

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/CJB356TCUPJ7DITRHQE6NPJ2ILWGYXZY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to