【python】使用python按照一定格式批量输出,地图热力图经纬度格式生成器
python使用列表按照一定格式批量输出,配合地图热力图程序“食用”更佳哦~ import re import random posi = [ '113.936539169252,22.5385001957843', '126.541615090316,45.8088258279521', '126.675638499523,45.7658661637579', '125.296653763226,43.8524275671504', '125.295401255854,43.8406414749619', '125.330602075906,43.8219535010431', '123.465461035375,41.8022741388046', '123.471096644822,41.6838300691906', ] count = [ '549', '36', '243', '713', '697', '97', '883', '59' ] listlng = [] listlat = [] for i in posi: lng = i.split(',')[0] lat = i.split(',')[-1] listlng.append(lng) listlat.append(lat) #print(listlng) for j in range(0,len