我有以下清单:
list_c = ['42.2529, -73.7910', '42.079846, -76.499364', '42.361824, -73.597979', '42.035959, -73.580146']
我想转换成这个:
list_c2 = [(42.2529, -73.7910),(42.079846, -76.499364),(42.361824, -73.597979),(42.035959, -73.580146)]
我正在尝试的代码是:
list_c2 = [(list_c[i]) for i in range(0, len(list_c))]
print("list_c2 =", list_c)
不幸的是,结果与 list_c
守着星空守着你
相关分类