a=‘174,46|75,89|189,36‘ list_1=a.split(‘|‘) for l in list_1: xy_list=[] x=l.split(‘,‘)[0] y=l.split(‘,‘)[1] xy_list.append(x) xy_list.append(y) print(xy_list)
a=‘174,46|75,89|189,36‘ list_1=a.split(‘|‘) xy_list=[] for l in list_1: x=l.split(‘,‘)[0] y=l.split(‘,‘)[1] xy_list.append(x) xy_list.append(y) print(xy_list)
原文地址:https://www.cnblogs.com/edanlee/p/11596947.html
时间: 2024-10-14 01:32:59