Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chapters = ['one', 'two', 'three',]
- for x in chapters:
- print x
- if x == chapters[:-1]:
- break
- else:
- print 'next'
- result:
- one
- next
- two
- next
- three
- next (<--I don't want this one)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement