string.join question
Michal Wallace
sabren at manifestation.com
Wed Oct 2 22:00:42 EDT 2002
On Thu, 3 Oct 2002 mongo57a at comcast.net wrote:
> Thanks - it "kind of" works - but not quite. So now there is a part 2 of the
> question:
>
> value = 'aaa'
> a = string.join(string.join(["'", value,"'"],''),',')
>
> This should yield (what I want.....): 'aaa',
>
> Instead it yields: ',a,a,a,'
>
> ??????????????????????? Looks crazy to me......
No, it's right, because join takes a sequence. Your "aaa"
string is a sequence of characters. :)
What are you really trying to do? :)
Cheers,
- Michal http://www.sabren.net/ sabren at manifestation.com
------------------------------------------------------------
Switch to Cornerhost! http://www.cornerhost.com/
Low Priced, Reliable Blog Hosting, With a Human Touch. :)
------------------------------------------------------------
More information about the Python-list
mailing list