Padding a list in python with particular value,self.myList.extend([0] * (4 - len(self.myList)))