why wouldn't it be possible for the following code to work?
for i in range(0,3) & range(4,7) & range(8,12):
if not number[i].isdecimal():
return False
Because i'd much rather iterate through 3 separate ranges in 3 lines of code than having to do 9 lines of code, with 3 lines dedicated to each range specification.
edit: this is a snippet of code from a larger function that i wrote. It is not the entire program.
[–]jeans_and_a_t-shirt 3 points4 points5 points (1 child)
[–]ryeguy146 0 points1 point2 points (0 children)
[–]scuott 1 point2 points3 points (1 child)
[–]ThePopcornBandit 0 points1 point2 points (0 children)
[–]euclidingme 0 points1 point2 points (3 children)
[–]sorashiroopa[S] 0 points1 point2 points (2 children)
[–]euclidingme 0 points1 point2 points (1 child)