I am trying to initiliase a list with the first 5 elements empty and then append to the list thereafter. The purpose is that when i write this list to a csv file, the output will be as such: ,,,,,,a,b,c here is my code:
l = list()
l[:5]=""
l.append('a')
When i print out this list, it contains only the element 'a'. How can I initiliase the list such the first 5 elements are empty and when I print it out it will show something like [, , , , , 'a']
thanks