这应该很容易,但是每次我想出一些东西时,它就会循环太多次,并使列表变得非常长。我想要的是看起来像这样的输出:
output = ['http://data.neonscience.org/api/v0/data/DP1.00095.001/KONZ/2018-01', 'http://data.neonscience.org/api/v0/data/DP1.00095.001/KONZ/2018-02]
我有以下信息。理想情况下,我希望能够添加到这些列表中的任何一个,并从那里创建更多的url。
SERVER = "http://data.neonscience.org/api/v0/data/"
SITECODE = ["KONZ","KONA","DCFS","WOOD"]
PRODUCTCODE = ["DP1.00095.001","DP1.00040.001","DP1.00041.001","DP1.00094.001"]
DATES = ['2018-01','2018-02','2018-03','2018-04','2018-05','2018-06']
SERVER = "http://data.neonscience.org/api/v0/data/DP1.00040.001/KONZ/"
SERVER2 = "http://data.neonscience.org/api/v0/data/DP1.00040.001/KONA/"
SERVER3 = "http://data.neonscience.org/api/v0/data/DP1.00040.001/DCFS/"
SERVER4 = "http://data.neonscience.org/api/v0/data/DP1.00040.001/WOOD/"
x = (SERVER + PRODUCTCODE[i] + '/' + SITECODE[i] + '/' + DATES[i])
gets = []