On Mon, Nov 29, 2010 at 8:28 PM, Robert Sjöblom <[email protected]>wrote:
> <snip> > > On a related note, do all functions implicitly contain "return None" > in them? Trying out this function (correctly) would get "None" added, > such as: > Enter grade:76 > B, Try Harder > None > > Is there a way to avoid "return None" without explicitly having the > function return something? Even an empty string will return a new > line. > AFAIK, no. Nor am I sure why you would want to - None is a singleton so there can only be once instance of it at a time. None is only printed when you're working in the interactive interpreter - if you write the program in a .py file and execute it you won't see the 'None' unless you print the result (which would indeed be None!) HTH, Wayne
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
