def tester(text):
    line12 = text.splitlines()[11]
print(line12)

def grab_data(year, rcvote):
    link = 'XXX/%s/roll%03d.xml' % (year, rcvote)
site = urllib.request.urlopen(link)
tester(site.read(100000))
while v:
    grab_data(year, rc)
v -= 1
Python: loop doing the same thing to one item n-times as opposed doing it once to n-items