Re: Can someone tell me why i get None at the end please this has me stuck for ages

2009-02-23 Thread Gabriel Genellina
En Mon, 23 Feb 2009 17:22:16 -0200, Gary Wood escribió: '''exercise to complete and test this function''' import string def joinStrings(items): '''Join all the strings in stringList into one string, and return the result. For example: >>> print joinStrings(['very', 'hot', 'day'])

Re: Can someone tell me why i get None at the end please this has me stuck for ages

2009-02-23 Thread Chris Rebert
On Mon, Feb 23, 2009 at 11:22 AM, Gary Wood wrote: > '''exercise to complete and test this function''' > import string > def joinStrings(items): > '''Join all the strings in stringList into one string, > and return the result. For example: > >>> print joinStrings(['very', 'hot', 'day']

Re: Can someone tell me why i get None at the end please this has me stuck for ages

2009-02-23 Thread Albert Hopkins
On Mon, 2009-02-23 at 19:22 +, Gary Wood wrote: > '''exercise to complete and test this function''' > import string > def joinStrings(items): > '''Join all the strings in stringList into one string, > and return the result. For example: > >>> print joinStrings(['very', 'hot', 'day']

Re: Can someone tell me why i get None at the end please this has me stuck for ages

2009-02-23 Thread Rob Clewley
You get None b/c that's what's being returned from your join strings function. Your function already prints out the result and doesn't return the joined strings a your usage case expects. So either return the joined strings from your function and don't print them inside the function, or vice versa

Can someone tell me why i get None at the end please this has me stuck for ages

2009-02-23 Thread Gary Wood
'''exercise to complete and test this function''' import string def joinStrings(items): '''Join all the strings in stringList into one string, and return the result. For example: >>> print joinStrings(['very', 'hot', 'day']) 'veryhotday' ''' word = [items] for item in it