Inserting a string into a list without getting split into characters
Another option is using the overloaded + operator
:
>>> l = ['hello','world']
>>> l = ['foo'] + l
>>> l
['foo', 'hello', 'world']
To add to the end of the list:
list.append('foo')
To insert at the beginning:
list.insert(0, 'foo')
Sticking to the method you are using to insert it, use
list[:0] = ['foo']
http://docs.python.org/release/2.6.6/library/stdtypes.html#mutable-sequence-types