center_gailv={'[30.707473754882812, 104.04808044433594]': '0.0931',
'[30.707473754882812, 104.04533386230469]': '0.0776',
'[30.707473754882812, 104.04258728027344]': '0.0763',
'[30.707473754882812, 104.04670715332031]': '0.0712',
'[30.711593627929688, 104.04258728027344]': '0.0569',
'[30.711593627929688, 104.04808044433594]': '0.0543',
'[30.710220336914062, 104.04670715332031]': '0.0517',
'[30.707473754882812, 104.04396057128906]': '0.0492',
'[30.708847045898438, 104.04533386230469]': '0.0466',
'[30.710220336914062, 104.04396057128906]': '0.0453',
'[30.708847045898438, 104.05082702636719]': '0.044',
'[30.710220336914062, 104.04121398925781]': '0.0401',
'[30.708847045898438, 104.04258728027344]': '0.0285',
'[30.710220336914062, 104.04258728027344]': '0.0259',
'[30.708847045898438, 104.04121398925781]': '0.0246',
'[30.710220336914062, 104.04945373535156]': '0.022',
'[30.707473754882812, 104.04945373535156]': '0.022',
'[30.711593627929688, 104.05082702636719]': '0.0194',
'[30.711593627929688, 104.04945373535156]': '0.0168',
'[30.710220336914062, 104.04533386230469]': '0.0155',
'[30.711593627929688, 104.04670715332031]': '0.0142',
'[30.710220336914062, 104.04808044433594]': '0.0142',
'[30.707473754882812, 104.05082702636719]': '0.0142',
'[30.711593627929688, 104.04121398925781]': '0.0142',
'[30.707473754882812, 104.04121398925781]': '0.0116',
'[30.711593627929688, 104.04533386230469]': '0.0103',
'[30.708847045898438, 104.04396057128906]': '0.0078',
'[30.711593627929688, 104.04396057128906]': '0.0078',
'[30.710220336914062, 104.05082702636719]': '0.0065',
'[30.708847045898438, 104.04670715332031]': '0.0065',
'[30.708847045898438, 104.04945373535156]': '0.0065',
'[30.708847045898438, 104.04808044433594]': '0.0052'}
center_gailv=sorted(center_gailv.items(),key=lambda x:x[1],reverse=False)
distance=[('[30.710220336914062, 104.04670715332031]', 93.7538288837121), ('[30.710220336914062, 104.04808044433594]', 94.65963984748198), ('[30.711593627929688, 104.04670715332031]', 107.10710273326457), ('[30.711593627929688, 104.04808044433594]', 107.90086196015443), ('[30.710220336914062, 104.04533386230469]', 207.5862002022236), ('[30.710220336914062, 104.04945373535156]', 208.8157835784163), ('[30.711593627929688, 104.04533386230469]', 213.94787487196606), ('[30.711593627929688, 104.04945373535156]', 215.14108587086636), ('[30.708847045898438, 104.04670715332031]', 229.66070190596798)]
gailv=[]
for i in range(len(distance)):
for k in range(len(center_gailv)):
if distance[i][0]==center_gailv[k][0]:
print('*********')
gailv.append(center_gailv[k])
print('************')
print(gailv)
python两个列表相比较
最新推荐文章于 2023-06-20 02:51:06 发布