[Tutor] print date and skip any repeats

questions anon questions.anon at gmail.com
Wed Sep 17 11:21:36 CEST 2014


Hi Tutor,
I think this should be simple but I can't find the right commands.

I have a date for each hour for a whole month (and more) and I would like
to write a loop that prints each date that is different but skips the dates
that are the same.

for i in date:
print i and then skip i until different
print next i and then skip i until different
etc.


Any feedback will be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140917/76afadb1/attachment.html>


More information about the Tutor mailing list