Guest User

Untitled

a guest
Feb 19th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21.  
  22.  
  23.  
  24. def output_word(word):
  25.  
  26. global newline_pending
  27. global output_line_length
  28.  
  29. if newline_pending == FALSE:
  30. output_margin()
  31. newline_pending = TRUE
  32. print word
  33. output_line_length = len(word)
  34. return
  35.  
  36. if output_line_length + 1 + len(word) <= page_width - margin_width:
  37. output_line_length += 1 + len(word)
  38. print word
  39. else:
  40. print "\n"
  41. new_line_pending = FALSE
  42. output_word(word)
  43. return
Add Comment
Please, Sign In to add comment