题解 | #计算某字符出现次数#
计算某字符出现次数
https://www.nowcoder.com/practice/a35ce98431874e3a820dbe4b2d0508b1
def test01(): str1 = input().lower() if len(str1) < 1 & len(str1) > 1000: raise Exception("报错") data1 = input().lower() print(str1.count(data1)) if __name__ == "__main__": try: test01() except Exception as ee: print("报错{}".format(ee))