Q:

How can i change the values returned by parent class function in python

I have this code
class Mother:
        def getList()
            data['list'] = [2,3,4,5]
            data = json.dumps(data)
            return HttpResponse(data, mimetype='application/json', status=200)

class Child(Mother)
      def getList()
          /////////

In the new function Here i want to get the list and do some modification like subtract some
              other list and resturn same  jsonresponse
How can i do that

A:

You'll have to abstract out the list generation part of your code from the response returning part.
This bit of code from Mother is, while not exactly invalid, not something that can work, either:
return HttpResponse(data, mimetype='application/json', status=200)
return list

After the first return statement, Python isn't executing the method anymore, so the second return will never run.
Try splitting it up like this:
class Mother(object):
    def makeList(self)
        data['list'] = [2,3,4,5]
        data = json.dumps(data)
        return data

    def getList(self)
        data = self.makeList()
        return HttpResponse(data, mimetype='application/json', status=200)

class Child(Mother)
  def makeList(self)
      my_list = super(Child, self).makeList()
      # do something to it
      return my_list

Now there is a makeList method on the Mother object, that constructs the actual list, and getList just formats it into an HttpResponse object.
In Child, makeList is overridden, but starts by calling the version from Mother. After that, you can do whatever modifications you need to, and return it. When you call child.getList(), it will use that new list, and then render it to an HttpResponse, since it inherits getList from Mother.

