Re: why is 0 first?



Adriano Ferreira wrote:
> Ah, and for loops are shorter by one character ;)
>
> for ( $i=0; $i<$n; $i++ ) { .. }

They are even shorter than that ;)
for (0..10) {...}

.



Relevant Pages

  • Re: python coding contest
    ... I also expect that someone will produce a yet shorter version after the contest closes, based on the knowledge from the winning solutions. ... I have a 123 byte solution based on a fairly repetitive 21 character string; if I could compress the representation of the string, ... It sounds like he encoded his as a row at a time and did two loops one for each character and one for each row. ...
    (comp.lang.python)
  • Re: python coding contest
    ... I am now very eager to see how these shorter versions ... I have a 123 byte solution based on a fairly repetitive 21 character string; if I could compress the representation of the string, ... It sounds like he encoded his as a row at a time and did two loops one for each character and one for each row. ...
    (comp.lang.python)
  • Re: [Full-Disclosure] safari dos
    ... Am 23.11.2003 um 03:10 schrieb kang@insecure.ws: ... >> or just shorter while ... > and probably some other loops are vulnerable, ... Charter: http://lists.netsys.com/full-disclosure-charter.html ...
    (Full-Disclosure)
  • Re: numbering variables
    ... sections on lists, for loops, and string formatting in the Python tutorial? ... (shorter, but not exactly clearer, especially not if you're new to Python) ...
    (comp.lang.python)
  • Re: 448 m freight train length
    ... refuges are of widely varying lengths, ... I can't see where 70 SLU / 448 m has come from. ... Its a good deal longer than a lot of single line passing loops or ... its a shorter - a lot shorter - than the UIC 750 m norm which ...
    (uk.railway)