[Tutor] for loop
Sean Novak
snovak at snovak.com
Wed Jun 11 03:36:47 CEST 2008
I know I'm going to feel stupid on this one..
I would normally write this in PHP like this:
for($i=1; i< count($someArray); $i++)
{
print $someArray[i]
}
essentially,, I want to loop through an array skipping "someArray[0]"
but in python the for syntax is more like foreach in PHP..
I've tried this to no avail
count = 0
for i in range(1,10):
if count == 0:
continue
else:
count += 1
print i
continue
it prints absolutely nothing.
More information about the Tutor
mailing list