Definition:
Back to the main index of this glossary
>>> import re
>>> english = '"Never increase, beyond what is necessary, the number of entities required to explain anything." -- William of Ockham (1285-1349)'
>>> print re.findall(r'\W+\s', english)
[', ', ', ', '." -- ']
>>> print re.findall(r'\W+\S', english)
['"N', ' i', ', b', ' w', ' i', ' n', ', t', ' n', ' o', ' e', ' r', ' t', ' e', ' a', '." -- W', ' o', ' O', ' (1', '-1']
Back to the main index of this glossary
