Implementation of Majority Judgement voting in python