I'm using Python 2.7 and wants to find out is there a way to check if a given string contains at least 4 sequential numbers going up or down?
The only way I could come up with is to check every character and its 3 following characters to see if they are digits and then to see if the difference between each character is 1.
Is there another way doing it?
Thank you in advance!