Hey, @Subi,
Regarding your query, you can go through this process also, the code shown below:
str1= "albert einstein"
str2= "issac newton"
list1 =str1.split()[0].capitalize()
list2 =str1.split()[1].capitalize()
list3 =str2.split()[0].capitalize()
list4 =str2.split()[1].capitalize()
result1 =[]
result2 =[]
result1.append(list1)
result1.append(list2[0])
result2.append(list3)
result2.append(list4[0])
temp =" "
out=temp.join(result1)
put=temp.join(result2)
print(out, put)
I know its a bit lengthy process, but you will understand better. Capitalize function in python will always convert the first letter of any string into the upper-case.
I hope this will help.