<p><br>
On Feb 17, 2014 11:06 AM, "Gabriele Brambilla" <<a href="mailto:gb.gabrielebrambilla@gmail.com">gb.gabrielebrambilla@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> I'm wondering how I can (if I can) make a for loop in which I don't use all the elements.<br>
><br>
> for example<br>
><br>
> a100 = list(range(100))<br>
><br>
> for a in a100:<br>
> print(a)<br>
><br>
> it print out to me all the numbers from 0 to 99<br>
> But if I want to display only the numbers 0, 9, 19, 29, 39, ...(one every 10 elements) how can I do it WITHOUT defining a new list (my real case is not so simple) and WITHOUT building a list of indexes?<br>
><br>
> thank you<br>
><br>
> Gabriele<br>
><br>
> __________since this is homework, study if statements and the modulo operator (%)_____________________________________<br>
> Tutor maillist - <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
> To unsubscribe or change subscription options:<br>
> <a href="https://mail.python.org/mailman/listinfo/tutor">https://mail.python.org/mailman/listinfo/tutor</a><br>
><br>
</p>