Skip to content

Instantly share code, notes, and snippets.

@katsully
Created February 10, 2015 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katsully/5da5597247f274d57efa to your computer and use it in GitHub Desktop.
Save katsully/5da5597247f274d57efa to your computer and use it in GitHub Desktop.
############################################
## By: Kat Sullivan
############################################
from random import randint
import sys
prev_line = ""
poem = ""
for line in sys.stdin:
words = line.split()
words.sort()
for idx,word in enumerate(words):
if idx % 2 == 0:
poem += word
poem += " "
poem += "\n"
print poem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment