import datetime
time=datetime.datetime.now()
dirty= ['fuck','狗日的','犊子','麻批','仙人板板','R你妈','操你','草你','鬼儿子','我日你']
class Pingbixitong(object):
def __init__(self,name):
self.name=name
def pingbi(self):
self.inputs=input('请输入聊天内容:')
for i in dirty:
self.inputs=self.inputs.replace(i,'hellow')
print('{} {}-speak:{}'.format(time,self.name,self.inputs))
ping1=Pingbixitong('背景')
ping2=Pingbixitong('妹子')
ping3=Pingbixitong('小弟')
while True:
n=input('切换人物:')
if n=='':
ping1.pingbi()
elif n=='':
ping2.pingbi()
elif n=='':
ping3.pingbi()
elif n=='q':
print('系统退出')
break
else:
print('你在逗我??')
效果图: