For whatever reason almost nothing is happening when I run this program. It seems incredibly straight forward and simple and It's driving me insane that It is not working.
fin = open("input.txt", 'r')
print("asd;lkfja;sdlkfj")
read = True
for line in fin.readlines():
print(line)
begComment = line.find("/*")
print(begComment)
endComment = line.find("*/")
if(begComment != -1):
print("found one")
if(endComment != -1):
line = line[:begComment] + line[endComment:]
print(line)
fin.close()
This seems like a really stupid question. I just don't understand why It isnt working.
This is the contents of my input.txt file, its in the same directory as the python file
asdfjas;dlkfja;sdlkfj /*;alksdjf;alksdjf*/
\n
a;sldkfj;akdsjf
asd;lfkja;sdlkjf
asd;flkja;dklfja;lksdjf;alkjsdf;lkajdsf;lkaj
as;dlfkj;asdlkf;akj
all that is output by this is the initial print statement (asd;lkfja;sdlkfj)