Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. chapters = ['one', 'two', 'three',]
  2.  
  3. for x in chapters:
  4. print x
  5. if x == chapters[:-1]:
  6. break
  7. else:
  8. print 'next'
  9.  
  10. result:
  11. one
  12. next
  13. two
  14. next
  15. three
  16. next (<--I don't want this one)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement