吳若靖python輸入input尋找find沒找到-1
file = open('金融常識.txt','r',encoding='utf-8')
lines = file.readlines()
file.close()
x = input('輸入搜尋關鍵詞: ')
for line in lines:
if line.find(x) != -1: print(line)
file = open('金融常識.txt','r',encoding='utf-8')
lines = file.readlines()
file.close()
x = input('吳若靖輸入搜尋關鍵詞: ')
n=int():n=0
for line in lines:
if line.find(x) != -1:
n=n+1
print(n,'',line,end="")
print('總共(n)題')
商業軟體期中考。https://ruojinnng.blogspot.com/2026/11/excelformulas_02006170374.html
回覆刪除程式設計期中考沒有嵌入影片。https://ruojinnng.blogspot.com/2026/11/htmlcssjavascriptpython.html
https://ruojinnng.blogspot.com/2026/10/excelandorcountcountifindirect.html
https://ruojinnng.blogspot.com/2026/10/pythoninputfind-1.html