Aug-19-2018, 11:14 AM
you cannot add objects of different type - str and list.
by the way, it's better to use advanced string formatting methods, rather than convert the list to str and then using +
Advanced formatting will be much more handy when it comes to using different types, e.g. numbers
by the way, it's better to use advanced string formatting methods, rather than convert the list to str and then using +
warriors = ["Kevin", "Casper", "Nick", "Jim", "Napolean"] print("The names of these men were: {}".format(', '.join(warriors)))in python 3.6+ you can also use the f-string syntax.
Advanced formatting will be much more handy when it comes to using different types, e.g. numbers
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs