Mar-27-2019, 10:55 PM
Hi, was wondering if you could help. My file f contains some tabs and I want to remove them. I have a code below that does read text line by line but does not remove tabs.
I have something like:
0 0 1 1
1 1 0 0
I want:
0011
1100
Thank you!
I have something like:
0 0 1 1
1 1 0 0
I want:
0011
1100
Thank you!
def readFromFile(f): input_j = list() with open(f) as file: for line in file: input_j.append(list(line.rstrip()))