On Thu, Feb 19, 2009 at 2:07 PM, Gary Wood <woody...@sky.com> wrote:
>  I'm stuck on a tutorial Hands on Python3
>
> Exercise 1.13.7.3. ** Complete the following function. This starting code is
> in joinAllStub.py. Save it to the new name joinAll.py. 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.

Cheers,
Chris

-- 
Follow the path of the Iguana...
http://rebertia.com
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to