new to python here. I am trying to extract certain sections that has display bitcoin prices. I want to only show me the prices after reading the rest of the file contents. I'm stuck with this current code
sentences = []
words_count = 0
word = input("Enter word: ")
count = 0
# file containing words and numbers
with open('data.txt') as file:
for line in file:
words = line.split()
words_count += len(words)
sentences.append(line)
for line in sentences:
if word in line:
btc = (line[13:21])
print(btc)
count += 1
else:
count == 0
print('Not found')
print(count, 'lines contain', word)