Advertisement
here2share

# string_cases.py

Jan 7th, 2015
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. # string_cases.py
  2.  
  3. mystr = 'hello world'.upper()
  4. print mystr  # HELLO WORLD
  5. mystr = mystr.lower()
  6. print mystr  # hello world
  7. mystr = mystr.capitalize()
  8. print mystr  # Hello world
  9. mystr = mystr.title()
  10. print mystr  # Hello World
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement