if is_yes=='yes' or 'no': 不对,应该是if is_yes=='yes' or is_yes=='no':
红线地方少了 is_yes==
if is_yes == 'yes' or is_yes == 'no'优化参考这个 https://ask.csdn.net/questions/7475214