Programming Examples
Python program to form a word by joining first character of each word
Write a Python code to enter a sentence. Form a word by joining all the first characters of each word of the sentence. Display the word.
Sample Input: Read Only Memory
Solution:
wd=""
str=input("Enter a string in mixed case : ")
str=" "+str
p=len(str)
for i in range(0,p):
    if(str[i]==' '):
        wd=wd+str[i+1]
print("New Word:",wd)
Output/ Explanation:
Enter a string in mixed case : Read Only Memory
New Word: ROM