SHARE
TWEET

JoeNotCharles

a guest Jan 9th, 2011 167 Never
  1. #!/usr/bin/env python
  2.  
  3. import sys
  4. rankings = sys.stdin.readline().strip().split(" > ")
  5.  
  6. candidateNum = 0
  7. candidates = {}
  8. f = open("candidates.txt", "r")
  9. for line in f:
  10.     candidateNum += 1
  11.     candidates[candidateNum] = line.strip()
  12. f.close()
  13.  
  14. for candidate in rankings:
  15.     print candidates[int(candidate)]
RAW Paste Data
Top