string.join question

Dennis Lee Bieber wlfraed at
Thu Oct 3 04:54:54 CEST 2002

mongo57a at fed this fish to the penguins on Wednesday 02 
October 2002 06:47 pm:

> Trying to join a string as follows: string.join(['\,'aaa','\],'')

> (the last characters are 2 single quotes).
> I want a character string which looks like 'aaa' (with quotes).
> Anybody know what I'm doing wrong? or if this is possible with
> string.join? Thanks.

        But what are the \'s supposed to be (or did stuff get lost in your 

        Off hand, as it is quoted above, your have an open quote, \, comma, 
close quote, aaa (which is not inside a string so what is Python 
supposed to be doing), open quote, comma, close quote, \]...

>>> print string.join(['','aaa',''],"'")

>>> aaa = "A long string of nothing"
>>> print string.join(['',aaa,''],"'")
'A long string of nothing'

 > ============================================================== <
 >   wlfraed at  | Wulfraed  Dennis Lee Bieber  KD6MOG <
 >      wulfraed at     |       Bestiaria Support Staff       <
 > ============================================================== <
 >        Bestiaria Home Page:         <
 >            Home Page:             <

More information about the Python-list mailing list