Advertisement
Guest User

now with less unix, more python3

a guest
Oct 30th, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def manipulateString(string):
  2.     numberOfSpaces = string.count(' ')
  3.     numberOfLowerC = sum(1 for lower in string if string.islower())
  4.     print("You entered: " + str(string))
  5.     print("There are " + str(numberOfSpaces) + " spaces in that string.")
  6.     print("Also, " + str(numberOfLowerC) + " lowercase characters.")
  7.  
  8. manipulateString("My cool function does great things!!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement