No subject

Chris Rebert clp2 at
Thu Feb 19 23:11:48 CET 2009

On Thu, Feb 19, 2009 at 2:07 PM, Gary Wood <woodygar at> wrote:
>  I'm stuck on a tutorial Hands on Python3
> Exercise ** Complete the following function. This starting code is
> in Save it to the new name Note the way an
> example is given in the documentation string. It simulates the use of the
> function in the Shell. This is a common convention:
> import string
> '''exercise to complete and test this function'''
> def joinStrings(sentance):
>     '''Join all the strings in stringList into one string,
>     and return the result. For example:
>     >>> print joinStrings(['very', 'hot', 'day'])
>     'veryhotday'
>     '''
>      # finish the code for this function
> # i tried this but not sure whats mising
>     for i in sentance:
>         print(i)

You're not supposed to output the strings, you've supposed to combine
them and return the single combined string (it's nearly identical to
how you summed the numbers). The printing is done by the calls to
print() outside of this function.


Follow the path of the Iguana...

More information about the Python-list mailing list