twoSeq=[['28.406925,77.285590', '28.409969,77.292279'],
['28.406925,77.285590', '28.402476,77.292956'],
['28.409969,77.292279', '28.403020,77.298851'],
['28.403020,77.298851', '28.392363,77.306091'],
['28.392363,77.306091', '28.378515,77.313990'],
['28.378515,77.313990', '28.367469,77.315308'],
['28.402476,77.292956', '28.399600,77.297313'],
['28.402476,77.292956', '28.397301,77.294096'],
['28.399600,77.297313', '28.392247,77.301909'],
['28.392247,77.301909', '28.392363,77.306091'],
['28.397301,77.294096', '28.399600,77.297313']]
def N_Seq(twoSeq):
first=twoSeq.copy()
last=twoSeq.copy()
for i in range(len(first)):
first[i].pop(0)
print(first,"--------")
for j in range(len(last)):
last[j].pop()
print(first)
N_Seq(twoSeq)
Выход:
[['28.409969,77.292279'], ['28.402476,77.292956'], ['28.403020,77.298851'], ['28.392363,77.306091'], ['28.378515,77.313990'], ['28.367469,77.315308'], ['28.399600,77.297313'], ['28.397301,77.294096'], ['28.392247,77.301909'], ['28.392363,77.306091'], ['28.399600,77.297313']] --------
[[], [], [], [], [], [], [], [], [], [], []]