I need to create an ID during extraction of data (scraping) on Python, so I need to give to each phrase an ID like (A50001) where A is a letter that is the initial letter of site, 5 is a number of stars and 0001 is the number of phrases. How I can do it?
CodePudding user response:
At the end i created like this:
for i in range(1, 100):
id = sitecode str(stars) str(i).zfill(4)