Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def manipulateString(string):
- numberOfSpaces = string.count(' ')
- numberOfLowerC = sum(1 for lower in string if string.islower())
- print("You entered: " + str(string))
- print("There are " + str(numberOfSpaces) + " spaces in that string.")
- print("Also, " + str(numberOfLowerC) + " lowercase characters.")
- manipulateString("My cool function does great things!!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement