Delete item in a list using a for-loop

前端 未结 5 1012
感情败类
感情败类 2021-01-13 17:35

I have an array with subjects and every subject has connected time. I want to compare every subjects in the list. If there are two of the same subjects, I want to add the ti

5条回答
  •  礼貌的吻别
    2021-01-13 17:55

    Iterate backwards, if you can:

    for x in range(subjectlength - 1, -1, -1):
    

    and similarly for y.

提交回复
热议问题