python - Concatenate numbers to URL in increasing order -


i want concatenate numbers in increasing order upto x in url. using:-

i=143  baseurl = 'https://example.com/listproduct/index/21/' + str(i)  while (i>0):     i-=1     print(baseurl) 

instead of getting urls different end numbers, getting same i=143. proper way write above?

baseurl = 'https://example.com/listproduct/index/21/'  while (i>0):    i-=1    print(baseurl  + str(i)) 

Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -