Created
October 20, 2022 07:23
-
-
Save RaMSFT/a0c228f7b2885372bc176b1ca0a66fa1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_title_string_spl(str): | |
#Convert the string to list of words | |
str_list = str.split(' ') | |
#Loop through each word from list of words | |
for word in str_list: | |
#Check if the word start characte is upper or not | |
if not word[0].isupper(): | |
#When first charcter is not uppper, stop the loop and return it's not title | |
return False | |
return True | |
#print(str_list) | |
print(check_title_string_spl("A Mind Boggling Achievement")) | |
print(check_title_string_spl("A Simple Python Program!")) | |
print(check_title_string_spl("Water is transparent")) | |
print(check_title_string_spl("Learn From Edabit And Medium")) | |
print(check_title_string_spl("I love to Program using Python")) | |
print(check_title_string_spl("This Is Insights And Data")) | |
print(check_title_string_spl("Love To Learn")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment