H
hong Yu
I am new to python.
I was confused:
['h', 'e', 'l', 'l', 'o']
I want to combine the items in the list into a string.
So:
File "<stdin>", line 1, in ?
TypeError: descriptor 'join' requires a 'str' object but received a 'list'
So why TypeError raised?
and
What's the difference between str and 'hello' ?
Thanks a lot.
I was confused:
['h', 'e', 'l', 'l', 'o']
I want to combine the items in the list into a string.
So:
Traceback (most recent call last):'hello'
but:
File "<stdin>", line 1, in ?
TypeError: descriptor 'join' requires a 'str' object but received a 'list'
So why TypeError raised?
and
What's the difference between str and 'hello' ?
Thanks a lot.