notepad-plus-plus-legacy/scintilla/test/examples/x.py

12 lines
233 B
Python
Raw Normal View History

# 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