Hey guys, this code is supposed to remove all the spaces at the end of each line. However from what I can tell it prints out the exact same file again instead of removing nothing. Have I been using the wrong test files? Or is there something wrong with my code?
f = open(filenm , "r") line = f.readline() for line in f: line = line.rstrip() print line
Thanks for the help guys