Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. story = "Twas brillig and the slithy toves\ndid gyre and gymbol in the wabe\nall mimsy were the borogroves\nand the mome wraths outgrabe"
  2.  
  3. print(story)
  4. print(len(story))
  5. print(story.upper())
  6. print(story[7])
  7. print(story.replace("the","ye"))
  8.  
  9. ages = [12, 19, 21, 48, 43, 83]
  10. newages = []
  11.  
  12. for age in ages:
  13. print(age, "becomes", age + 1)
  14. newages.append(age+1)
  15. print(ages)
  16. print(newages)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement