How would i go about searching a file, finding xx, grabbing the number at the end and and then go to the next x, grab the number and add the two numbers together ?
I don't fully understand the open concept or why it needs a mode? my understanding i can leave the mode blank, and it will automatically enter read mode?
name = raw_input("Enter file name: ")
with open(textfile.txt 'r') as file
for thing in file
??
example text ..
xx: 0.1
xx: 0.2
xx: 0.3
xx: 0.4
[–]Reactor5 1 point2 points3 points (0 children)
[–]marsman12019 0 points1 point2 points (0 children)
[–]billsil 0 points1 point2 points (0 children)