'''【课后作业要求】 请找出下列代码中的3处错误,并改正: def check(s): if "!" in s print("字符串中含有感叹号!") else: print("字符串中没有感叹号!") string = "Hello world" check(s) ''' def check(s): if "!" in s: print("字符串中含有感叹号!") else: print("字符串中没有感叹号!") string = "Hello world" check(string)