3 ms·
>is raw_input the same as stdin? Yes. $ echo foo | python -c 'print raw_input()[::-1]' oof
by eurleif 13y ago
>is raw_input the same as stdin?
Yes.
$ echo foo | python -c 'print raw_input()[::-1]'
oof
- dec0dedab0de 13y agoUpvoted. I guess I was thinking more along the lines of one shouldn't use raw_input() when you're expecting a pipe since it only takes one line. $ ps | python -c 'print raw_input()' PID TTY TIME CMD But I suppose you could just loop to get around that anyway.