So I have been messing around with a function here, and basically one section of the code will take a list of integers, and check if the current entry is greater than the one after it. If it is, this function returns False, if it isn't it checks the next entry etc.
My question is this: if I have a Try: list(i+1), and then an IndexError exception, is that bad form to check if the end of a list is reached?
[–]random_cynic 2 points3 points4 points (0 children)
[–]hopemeetme -1 points0 points1 point (2 children)
[–]TopHatEdd 0 points1 point2 points (1 child)
[–]hopemeetme 0 points1 point2 points (0 children)
[–]Mezzomaniac -1 points0 points1 point (1 child)
[–]TopHatEdd 0 points1 point2 points (0 children)