Is there a better way to code the below than to specify blocks as I have.
Ideally I'd like to specify blocks simply as *blocks=(12,20,35)*

blocks=[(1,12), (13,20), (25,35)]
for i,j in enumerate(blocks):
    for x in xrange(blocks[i][0],blocks[i][1]+1):
        print i+1, x


Thanks in advance.
Jignesh
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to