我想创建一个Python程序来查找文本文件中一行中的唯一单词.
文本文件"details"具有以下行
My name is crazyguy
i am studying in a college and i travel by car
my brother brings me food for eating and we will go for shopping after food.
Run Code Online (Sandbox Code Playgroud)
它必须返回输出为
4
10 #(since i is repeated)
13 #(Since food and for are repeated)
Run Code Online (Sandbox Code Playgroud)
如果代码有效,那么在挖掘数据时,它对于更大的文本文件是否会以相同的方式工作?