季定睿python,方法read(),seek(0),readlines(),input
file = open('金融常識.txt','r',encoding='utf-8')
reading = file.read()
file.seek(0) #回到檔案的開始
lines = file.readlines()
file.close()
print('read()方法讀共', len(reading), 'readlines()方法讀共', len(lines))
x = input('金一乙季定睿輸入搜尋關鍵詞: ')
n = 0
for line in lines:
if x in line:
n=n+1
print( n, ' ', line,end='')
print(f'總共{n}題')
商業軟體期中考。Google找到你的網頁,一定要將網頁標題的亂碼改成有意義的文字。季定睿EXCEL公式FORMULAS。https://dymtdfrudfytuimtyd.blogspot.com/2026/11/excelformulas.html
回覆刪除1019. https://dymtdfrudfytuimtyd.blogspot.com/2026/10/pythonreadseek0readlinesinput.html
1012.https://dymtdfrudfytuimtyd.blogspot.com/2026/10/pythonlistset372411251.html