pythonでstringクラスでよく使われる方法
# -*- coding:utf-8 -*-
import string # string
aStr = 'My name is magicpwn.'
print string.capwords(aStr) # 。
spWord = string.split(aStr) #
print spWord
print string.join(spWord) # 。
role = string.maketrans('abegilopstz', '46361109572') # , replace
print aStr
print aStr.translate(role) #
#
value = {'name': 'glj'} #
t = string.Template('''she's my sister,$$her name is $name . ${name}s''') # , , { }
p = t.substitute(value) #
print p
str2 = aStr.replace('pwn','PW').replace(' ', '') #
print str2