Put the ranges in a list:
An even more pythonic way is to:
ranges=[(1,15) ,(16,30),(31,45),(46,60),(61,75)]Then when you scan a line, you use the index of the item to retrieve the corresponding element in
ranges
and compare its value with the two limits.An even more pythonic way is to:
iterate lines zip(line,ranges) iterate result which are (line_item, (min,max)) and compare
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Your one-stop place for all your GIMP needs: gimp-forum.net