Write Python script that takes a string with multiple words and then
Answers
Answered by
0
Answer:
Explanation:
string = input('Enter line:')
length = len(string)
string2 = ''
for i in range(0, length):
if i == 0:
string2 += string[0].upper()
continue
elif string[i] == ' ':
string2 += string[i]
string2 += string[i+1].upper()
continue
elif string[i] != ' ':
if string2[i].upper() is True: # I feel like there is something wrong with this line
continue
else:
string2 += string[i]
print(string2)
Similar questions