The immediate syntax error is because of the square brakets you're putting around for line in sys.stdin
. Those are unnecessary and should simply be dropped.
However, you're still going to have an issue with your code, because you're calling ord
on a full line, not just a single character. You probably need an additional loop to iterate over the characters of each line. In the following code, that's what I do, with the further addition of stripping the line so that we don't try to shift the newline character to something strange:
import sys; print "\n".join("".join(chr(ord(char)+3) for char in line.strip()) for line in sys.stdin)