Untitled

mail@pastecode.io avatar
unknown
python
a month ago
219 B
2
Indexable
Never
def start_from_zero_sen(org_d):
  new_d = {}
  for sen_id, d in org_d.items():
    sen_id1 = int(sen_id) - 1
    new_d[sen_id1] = d

  return new_d

for i in data:
  i["sentences"] = start_from_zero_sen(i["sentences"])
Leave a Comment