I have a wordlist that contains returns to separate each new letter. Is there a way to programatically delete each of these returns using file I/O in Python?
Edit
Remove empty lines in the file:
#!/usr/bin/env python import fileinput for line in fileinput.input("wordlist.txt", inplace=True): if line != '\n': print line,
The file is moved to a backup file and standard output is directed to the input file.