Question relating to classmethod.
I failed a coding test. I don't know the exact question, but it's something this. '''input1= int input2= int[]''' class something(object): @classmethod def findlargesmalldiff(cls,input1,input2): pass Need to fill the required space with correct code. Eg. input1= 5 input2= [11,13,7,9,15] expected output: 7 I totally messed up by doing the below code and felt like my python skills sucks. class something(object): self.input1= input1 self.input2= input2 def number(self): return min(input2) input1= 5 input2= [] input2.append(input1) @classmethod def findlargesmalldiff(cls,input1,input2): return cls(input2) diff= something.findlargesmalldiff(5,['7','11','13','9','12']) print(diff.number())