[Tutor] Python help

Tone Lite tonelitebeats at gmail.com
Thu Feb 27 23:35:18 CET 2014


Hello,

I am having trouble coming up with a solution to this exercise and any help
would be appreciated, thanks! I have attached the code below.



'''exercise to complete and test this function'''

def joinStrings(stringList):
    '''Join all the strings in stringList into one string,
    and return the result, NOT printing it. For example:

    >>> s = joinStrings(['very', 'hot', 'day']) # returns string
    >>> print(s)
    veryhotday
    '''
    # finish the code for this function



def main():
    print(joinStrings(['very', 'hot', 'day']))
    print(joinStrings(['this', 'is', 'it']))
    print(joinStrings(['1', '2', '3', '4', '5']))

main()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140227/784fc956/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: joinAllStub.py
Type: text/x-python-script
Size: 516 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20140227/784fc956/attachment.bin>


More information about the Tutor mailing list