Pythonのお勉強 Part15
レス数が950を超えています。1000を超えると書き込みができなくなります。
0958デフォルトの名無しさん
2006/12/13(水) 18:21:27def trans_macro(text):
spam_macros = [('egg', 'egg and spam'),
('spam', 'spam with bacon'),
('ham', 'ham and spam and egg')]
for i in spam_macros:
text = text.replace(i[0], i[1])
return text
レス数が950を超えています。1000を超えると書き込みができなくなります。