for line in open("radishsurvey.txt"): line = line.strip() parts = line.split(" - ") name = parts[0] vote = parts[1] print(name + " voted for " + vote)