Guest User

Untitled

a guest
Dec 15th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. # Exercise 1
  2. quote = """
  3. “But man is not made for defeat,“ he said.
  4. “A man can be destroyed but not defeated.”
  5. - Ernest Hemingway "The Old Man and the Sea"
  6. """
  7. print(quote)
  8.  
  9. # Exercise 2
  10. quote = "It was a bright cold day in April, and the clocks were striking thirteen."
  11. slice = quote.index(',')
  12. print(quote[:slice])
  13.  
  14. # Exercise 3
  15. lyst = ["The", "fox", "jumped", "over", "the", "fence", "."]
  16. phrase = ' '.join(lyst[:-1]) + lyst[-1]
  17. print(phrase)
Add Comment
Please, Sign In to add comment