how to make return(self.res) not to output the content of list ?

Ian Kelly ian.g.kelly at gmail.com
Wed Sep 24 12:05:00 EDT 2014


On Wed, Sep 24, 2014 at 7:55 AM, luofeiyu <elearn2014 at gmail.com> wrote:
>
> now what i want to do is :
> 1.keep  return(self.res)  in grow method.
> 2.it is my target that when run  the code:
>
> import analyse
> x=analyse.status()
> x.grow()
>
> there is nothing output in my console ,  to make return(self.res) not to
output the content of list ,
> how can i do ?

You could write a separate method that just calls self.grow() and does not
return the result, and call that method instead from the interactive
interpreter.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140924/40400ff9/attachment.html>


More information about the Python-list mailing list