Advertisement
Guest User

here you go!

a guest
Oct 30th, 2014
4
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. #!/usr/bin/python2
  2. import sys
  3. string = sys.argv[1]
  4.  
  5. def manipulateString(string):
  6.     numberOfSpaces = string.count(' ')
  7.     numberOfLowerC = sum(1 for lower in string if string.islower())
  8.     print("You entered: " + str(string))
  9.     print("There are " + str(numberOfSpaces) + " spaces in that string.")
  10.     print("Also, " + str(numberOfLowerC) + " lowercase characters.")
  11.  
  12. manipulateString(string)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement