I am trying to open a .c file with the below content
web_test("LunchType",
"LB=\"foodType\":\"",
"RB=\",",
"ORD=ALL",
"SEARCH=ALL",
LAST);
used the following code to open and read the content
def open_file_read_line_by_line(self,file_to_read):
with io.open(file_to_read,"rt",encoding='utf-8') as f:
while True:
readfile = f.readline()
# readfile = f.read()
if not readfile:
break
yield readfile
f.close()
when reading the second line, I get the following content
"LB=\\"foodType\\":\\"",
There is an additonal '\' infront of '\' . Can anyone suggest how can I correct this ?