0

I am trying to convert an integer (num) to bins as per given interval. the bin size (intervals) are [1, 200), [200, 400), [400, 800), [800, 1200), [1200, num]
I'am doing it in a crude way ...
def create_bins(num):
"""Create Bins as per given intervals."""
s1, s2, s3, s4 = 199, 200, 400, 4...