我正在编写在文本文件中查找的代码,并查看输入是否在其中。
例如,
我输入"比萨"
我的文本文件包含:
bread pizza pasta tomato
有没有办法打印披萨这个词所在的行号?
python numbers line
line ×1
numbers ×1
python ×1