Sort stdin input lines and send result to stdout : Standard Read « Development « Python






Sort stdin input lines and send result to stdout


import sys
lines = sys.stdin.readlines()           
lines.sort()                             
for line in lines: print line,          

           
       








Related examples in the same category

1.sys stdin readline
2.Use raw input to read int value
3.sys.stdin.readline() with out error check
4.Simple Script That Counts the Words in sys.stdin