Given that l is a list of integers and win is an integer, the following code produces a list lpadded:
lpadded = win // 2 * [-1] + l + win // 2 * [-1]
In Python, you can “multiply” a list by an integer to build a list of repeated elements.
>>> [42] * 4
[42, 42, 42, 42]
>>> ['hello', 'world'] * 3
['hello', 'world', 'hello', 'world', 'hello', 'world']
So the expression win // 2 * [-1]
creates a list
object containing win // 2
copies of the number -1.