Guest User

Untitled

a guest
Nov 19th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. def count_letter_b(string):
  2. #TODO: Your code goes here
  3. a = int(string.count('B'))
  4. b = int(string.count('b'))
  5. return a + b
  6.  
  7. print count_letter_b("Bubble Bungle")
  8.  
  9. string.upper().count('B')
  10.  
  11. def count_letter_b(string):
  12. return sum(map(string.count, 'Bb'))
  13.  
  14. def countInvariantChars(c,s):
  15. return s.upper().count(c.upper())
  16.  
  17.  
  18.  
  19. print(countInvariantChars("c","HabloCShaprc"))
Add Comment
Please, Sign In to add comment