What's the difference between str and 'hello' ?

Heiko Wundram modelnine at ceosg.de
Thu May 19 07:56:57 EDT 2005


Am Donnerstag, 19. Mai 2005 11:27 schrieb hong Yu:
> >>> str.join(a)
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> TypeError: descriptor 'join' requires a 'str' object but received a 'list'
>
> What's the difference between str and 'hello' ?

str.join("",a) <=> "".join(a)
(<=> as in equivalence relation)

HTH!

-- 
--- Heiko.
listening to: Bjork Guðmundsdottir & Trio - Luktar-Gvendur
  see you at: http://www.stud.mh-hannover.de/~hwundram/wordpress/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050519/91fc0f94/attachment.sig>


More information about the Python-list mailing list