Advertisement
DeepRest

Detect Capital

Jan 24th, 2022
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. class Solution:
  2.     def detectCapitalUse(self, word: str) -> bool:
  3.         return search(r'^([A-Z]?([a-z]+|[A-Z]+))$', word)
  4.        
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement