How does Python count the number of coverage of each point in the interval of a nested list with a large amount of data?

for example, :

[[15,65], [30,80], [36,86], [45,95], [45,95]] there are many small lists nested in a large list. How to count how many times each point in the interval has been covered? For example, if you only look at [15,65], [30,80], 30-65, these points will be covered twice

because of the large amount of data, a two-tier loop cannot be used. So is there any way?

Thank you in advance ~

Jun.15,2021

Python3

>>> from collections import Counter
>>> ls=[[15, 65], [30, 80], [36, 86], [45, 95], [45, 95]]
>>> c=Counter()
>>> for l in ls:
    c.update(range(*l))

    
>>> c
Counter({45: 5, 46: 5, 47: 5, 48: 5, 49: 5, 50: 5, 51: 5, 52: 5, 53: 5, 54: 5, 55: 5, 56: 5, 57: 5, 58: 5, 59: 5, 60: 5, 61: 5, 62: 5, 63: 5, 64: 5, 65: 4, 66: 4, 67: 4, 68: 4, 69: 4, 70: 4, 71: 4, 72: 4, 73: 4, 74: 4, 75: 4, 76: 4, 77: 4, 78: 4, 79: 4, 36: 3, 37: 3, 38: 3, 39: 3, 40: 3, 41: 3, 42: 3, 43: 3, 44: 3, 80: 3, 81: 3, 82: 3, 83: 3, 84: 3, 85: 3, 30: 2, 31: 2, 32: 2, 33: 2, 34: 2, 35: 2, 86: 2, 87: 2, 88: 2, 89: 2, 90: 2, 91: 2, 92: 2, 93: 2, 94: 2, 15: 1, 16: 1, 17: 1, 18: 1, 19: 1, 20: 1, 21: 1, 22: 1, 23: 1, 24: 1, 25: 1, 26: 1, 27: 1, 28: 1, 29: 1})
>>> 
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e44529-44aa4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e44529-44aa4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?