Update homework_5 election.py

use dictionary comprehension in loop