So i've wrtitten this code:
CaseList = []
f_Case = open("C:/Users/Luke Roberts/Desktop/Lists/CaseList.txt", "r")
for line in f_Case:
CaseList.append(line)
print(CaseList)
but when i print the list it comes out as:
['Case 1\n', 'Case 2\n', 'Case 3\n', 'Case 4\n', 'Case 5']
Is there a way to have it be added to the list without the '\n'? If not, is there a way to remove the '\n' from each string?
Any and all help is appreciated! Cheers