您无法使用单一格式显示您的输出。您可以使用列表-COMP

>>> listex = range(0, 101, 25)
>>> ["https://thisisan{}example.com".format(i) for i in listex]
['https://thisisan0example.com', 'https://thisisan25example.com', 'https://thisisan50example.com', 'https://thisisan75example.com', 'https://thisisan100example.com']

您可以使用map这里(如果您正在使用PY 3,紧裹list调用),

>>> map("https://thisisan{}example.com".format,listex)
['https://thisisan0example.com', 'https://thisisan25example.com', 'https://thisisan50example.com', 'https://thisisan75example.com', 'https://thisisan100example.com']

这可以被存储在您的变量baseurl为

baseurl = map("https://thisisan{}example.com".format,listex)

速度对比可以用做timeit

$ python -m timeit 'listex = range(0, 101, 25);["https://thisisan{}example.com".format(i) for i in listex]'
1000000 loops, best of 3: 1.73 usec per loop
$ python -m timeit 'listex = range(0, 101, 25);map("https://thisisan{}example.com".format,listex)'
1000000 loops, best of 3: 1.36 usec per loop

正如你所看到的,map较快这里(Python2)因为没有一个lambda