Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def count_letter_b(string):
- #TODO: Your code goes here
- a = int(string.count('B'))
- b = int(string.count('b'))
- return a + b
- print count_letter_b("Bubble Bungle")
- string.upper().count('B')
- def count_letter_b(string):
- return sum(map(string.count, 'Bb'))
- def countInvariantChars(c,s):
- return s.upper().count(c.upper())
- print(countInvariantChars("c","HabloCShaprc"))
Add Comment
Please, Sign In to add comment