Hello guys, I am new around here. Anyways, I am having a problem with reading some information from a text file.
Sample text file:
density = -1.0
number = 2004
Ok so what do I use in order to get the number -1.0 from the text file? Also, what if I have to get the number 2004 (To move on to the next line....). The code I have been using works, but it returns to me the whole second line, when I only want the number 2004 (I used the linecache module and it returns the whole text in the second line). That is just a random text file, but say all my text files have the SAME format but the numbers change....how do i tell python to grab the full number?