bgfx/3rdparty/scintilla/test/examples/x.py

12 lines
222 B
Python
Raw Normal View History

2015-06-08 20:07:35 -04:00
# Convert all punctuation characters except '_', '*', and '.' into spaces.
def depunctuate(s):
'''A docstring'''
"""Docstring 2"""
d = ""
for ch in s:
if ch in 'abcde':
d = d + ch
else:
d = d + " "
return d