Python cant convert ‘list’ object to str error [closed]

As it currently stands, you are trying to concatenate a string with a list in your final print statement, which will throw TypeError.

Instead, alter your last print statement to one of the following:

print("Here is the whole thing :" + ' '.join(letters)) #create a string from elements
print("Here is the whole thing :" + str(letters)) #cast list to string

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)