How to print all indices of a list in python


How to print the indexes of the list.
reply:
Hint: 0 1 3 …
I like: 0 0 0 …
A message is represented as part of a list. The list index indicates the number of messages. For example, the first message (extension number 1) corresponds to the zero (0) index in the list.

I have:
Index: 1
likes: 0

I did not get the answer

post = ()

print (& # 39; 1) Create an article & # 39;)
alternative = int (input ())
t = post.append (0)

if (alternative == 1):

if(len(postagem) < 1):
    postagem.append(0)
    print('Indice:', postagem.index(0))
    print('likes:', postagem(0))

if(len(postagem) >= 1):
    postagem.append(0)
    print('Indice:', len(postagem) - 1)
    print('likes', postagem(1))