#-*coding:utf-8-*
import re
def createid(matchobject,no=[0]):
no[0]+=1
return "[%d]"%no[0]
text = "★A child is a human being who is not yet an adult.★A child is a human being who is not yet an adult.★A child is a human being who is not yet an adult."
text=re.sub("★",createid,text)
print(text)