Sort stdin input lines and send result to stdout : Standard Read : Development PYTHON examples


PYTHON examples » Development » Standard Read »

 

Sort stdin input lines and send result to stdout




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

           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Development
» Standard Read