mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-29 11:05:36 -05:00
12 lines
222 B
Python
12 lines
222 B
Python
|
# 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
|