You can think of it as an horizontal mirror of a string with a "-" at positions going from last to first and back to last:
side = 6
for position in range(1-side,side): # last to first, and back (abs value)
A = [" "]*side # left half
A[abs(position)] = "-" # set "-" at position
A += A[-2::-1] # mirror for right side
print(*A)
-
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…