怎么会不断出现死循环
mr = raw_input("Enter something mr:")
name = raw_input('Enter something name:')
#pd =True
while True:
if mr.startswith('Mr.'):
print 'This is Mr.'+name
elif mr.startswith('Mrs.'):
print 'This is Mrs.'+name
else:
print 'error'
[解决办法]
你设计的就是死循环啊,把while ture去了或者在循环内加break就OK了