SyntaxFix
Write A Post
Hire A Developer
Questions
subprocess.check_output() returns bytes.
so you need to convert '\n' to bytes as well:
f.write (plaintext + b'\n')
hope this helps