I'm trying to extract few data from txt file(actually it's pdf file but i couldn't find a way to extract data from pdf so firstly i convert .pdf to .txt) but in that way this is a bit confusing. Are there better way to do that maybe module or something.
with open("example.txt","r") as f:
for i in f.readlines():
strings = i.split(" ")
for item in strings:
if item == "Price":
order=strings.index("Price") #i found the index of price
real_price = strings[order+1] #then i took the info that i look for
print(f"Price is {real_price}")
#Price 12,90 that's how looks like in file