Below is the code. I don't understand the meaning of the last bracket in [::-1][:-1], and how come can you write two brackets at the same time. I understand that the first slice bracket reverses the order of the string, but what does the second do?
for i in range(n,0,-1):
temp = list(alphabets[:n][i-1:])
print('-'.join(temp[::-1][:-1]+temp).center(4*n-3,'-'))
Thanks for cooperation!