"len" is a built-in function in Python, so you probably don't want to use it as a variable name.
What is this C code actually trying to do? Don't try to transliterate it; instead, read up on how lists and slicing work, and rewrite it in Python starting from a higher level of abstraction. One hint- you can copy the same datum many times without a while loop... # reassign sub-list interval [i, j-1] buffer[i:j] = [data] * (j-i) # reassign the entire list buffer[:] = [data] * len(buffer) -- http://mail.python.org/mailman/listinfo/python-list