[Tutor] sort problem
alan.gauld at btinternet.com
Wed Sep 8 19:40:29 CEST 2010
"Roelof Wobben" <rwobben at hotmail.com> wrote
> > Carefully read the documentation for str.join:
> > http://docs.python.org/library/stdtypes.html#str.join
> >How does it work, what does it return, etc. Then fix the
> >corresponding line in your code.
>It puts all the elements of iterable into one string named str.
Thats not what the documentation says...
> So it returns a string.
When trying to understand how a function works, or debug these kinds
errors use the >>> prompt to experiment. It's the definitive way of
Python will do.
For example try:
Can you see what Python has done?
Use the >>> prompt it is one of the most powerful tools you have.
Author of the Learn to Program web site
More information about the Tutor