Hacker News new | past | comments | ask | show | jobs | submit login

Indeed:

    all(a < b for a,b in zip(seq,seq[1:]))
(Although one might want <= if checking to see if the sequence is sorted, rather than strictly ascending (that is, it can contain matching/repeated elements)).



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: