Python concatenate list

Viewed 39167

I'm new to python and this is just to automate something on my PC. I want to concatenate all the items in a list. The problem is that

''.join(list)

won't work as it isn't a list of strings.

This site http://www.skymind.com/~ocrow/python_string/ says the most efficient way to do it is

''.join([`num` for num in xrange(loop_count)])

but that isn't valid python...

Can someone explain the correct syntax for including this sort of loop in a string.join()?

4 Answers
Related