Skip to content

Instantly share code, notes, and snippets.

@naosim
Last active June 21, 2017 22:27
Show Gist options
  • Save naosim/30bfd1e5beb71378aeaa1ee46ecbb298 to your computer and use it in GitHub Desktop.
Save naosim/30bfd1e5beb71378aeaa1ee46ecbb298 to your computer and use it in GitHub Desktop.
pythonでパイプを処理する
import sys
i = 0
for line in sys.stdin:
print "{0}:{1}".format(i, line.strip())
i = i + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment