if __name__ == '__main__': str1 = input('input a string: \n') str2 = input('input a sub string: \n') ncount = str1.count(str2) print(ncount)
本文共 201 字,大约阅读时间需要 1 分钟。
if __name__ == '__main__': str1 = input('input a string: \n') str2 = input('input a sub string: \n') ncount = str1.count(str2) print(ncount)
转载于:https://www.cnblogs.com/botoo/p/7305497.html