I would really appreciate if someone could help me understand each line of code in this program. Thanks
sentence = "ASK NOT WHAT YOUR COUNTRY CAN DO FOR YOU ASK WHAT YOU CAN DO FOR YOUR COUNTRY"
s = sentence.split()
another = [0]
print(sentence)
for count, x in enumerate(s):
if s.count(x) < 2:
another.append(max(another) + 1)
else:
another.append(s.index(x) +1)
another.pop(0)
print(another)