I'm learning python and now I'm having some problems with reading and analyzing txt files. I want to open in python a .txt file that contains many lines and in each line I have one fruit and it's price.
I would like to know how to make python recognize their prices as a number (since it recognizes as a string when I use readlines()) so then I could use the numbers in some simple functions to calculate the minimum price that I have to sell the fruits to obtain profit.
Any ideas of how to do it?