From: Gavin Sinclair Date: 2004-01-22T10:14:19+09:00 Subject: Re: New to Python: my impression v. Perl/Ruby On Thursday, January 22, 2004, 7:59:58 AM, GGarramuno wrote: > for i in (0..i); something; end > to me has a bunch of advantages over times, step and the such. With the above > construct you know that: > a) i has to be a number a = 'a' b = 'z' # 100 lines of code for i in (a..b); something; end > e) you can change the starting point (ie. not start at 0). The thing I like about #times over #each or 'for' is that you don't use a needless variable. for i in (1..10) ... (1..10).each { |i| ... (1..10).each { ... 10.times { ... If I just want to do something 10 times, why should I involve 'i'? Gavin