Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- twinGap = 0 // current gap between twins
- count = 0
- maxTwinGap = 0 // max gap between twins
- // while loop goes through all entries of list twins
- while count < len(twins):
- // gap between twins is the list entry of index count + 1 (a tuple)
- // the [1] selects the second entry in the tuple
- twinGap = twins[count+1][1] - nextP
- // if the current twinGap is > maxTwinGap, we have a new maxTwinGap
- if twinGap > maxTwinGap:
- maxTwinGap = twinGap
- // loop update condition
- count +=1
- print twinGap
Add Comment
Please, Sign In to add comment