Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- def output_word(word):
- global newline_pending
- global output_line_length
- if newline_pending == FALSE:
- output_margin()
- newline_pending = TRUE
- print word
- output_line_length = len(word)
- return
- if output_line_length + 1 + len(word) <= page_width - margin_width:
- output_line_length += 1 + len(word)
- print word
- else:
- print "\n"
- new_line_pending = FALSE
- output_word(word)
- return
Add Comment
Please, Sign In to add comment