On 13/06/16 08:46, Ek Esawi wrote:
> Here is a beginner code that might work for you. Best of luck.   EK
> 
> b=[12, 20, 35]
> 
> for i in range(len(b)):
>      if i==0:
>           c=0
>      else:
>           c=b[i-1]
>      for j in range(c, b[i]):
>           print(i+1,j+1)

The problem here is that it doesn't give the gaps in the output
data that the OP requested. That's why we said they need the start
and stop values in the ranges.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


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

Reply via email to