Advertisement
Zuma32

Check If It's a Title String

Jul 24th, 2024
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. # just realized sloth is fun ;)
  2.  
  3. def checkTitle(title):
  4.     l = title.split(" ")
  5.     is_title = True
  6.  
  7.     for word in l:
  8.         if not word[0].isupper():
  9.             is_title = False
  10.  
  11.     return is_title
  12.  
  13. title = "Water is transparent"
  14.  
  15. print(checkTitle(title))
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement