我写了这个小代码来计算文本中单词的出现次数:
string=input("Paste text here: ") word=input("Type word to count: ") string.count(word) x=string.count(word) print (x)
问题是它区分大小写.如何使其不区分大小写?
python
python ×1