Why is this incorrect, showing runtime error


#1

def subsets(self, A):
if input == []:
return [[]]
else:
a = subsets(input[1:])
return a + [[input[0]] + b for b in a]