I have the following 2D array which is created from reading a file
[['1', '200', '312', '4321', '53123\n'], ['2', '234', '313', '4342', '55657\n'], ['3', '343', '454', '587\n']]
it is created using the following
def returnDocument(PROFILE):
with open("tbs_save.txt") as textFile:
data = [data.split(",") for data in textFile]
print(data)
the data is stored like this
1,200,312,4321,53123
2,234,313,4342,55657
3,343,454,587
how can i remove the \n from the end of each array?