[Tutor] understanding join
steve.poe at gmail.com
Thu Jul 31 04:23:31 CEST 2008
> Does this look useful?
> In : people = [ 'Tom', 'Dick', 'Harry' ]
> In : ', '.join(people)
> Out: 'Tom, Dick, Harry'
> Your confusion is in thinking about the string 'ABC' as a single
> entity. For the purposes of join(), it is a sequence of three letters.
> The argument to join() is a sequence of strings, not a single string.
Your explanation about my confusion is right on target. Thank you!
Okay, now let's join people to people and what do we get?
More information about the Tutor