July 25, 2021
def solution(s):
words = s.split()
print(words)
for i in range(len(words)):
if words[i][0].isdigit():
words[i] = words[i][0] + words[i][1:].lower()
else:
words[i] = words[i][0].upper() + words[i][1:].lower()
answer = words[0]
idx = len(answer)
word_idx = 1
while idx < len(s):
if s[idx] == ' ':
answer += ' '
idx += 1
else:
answer += str(words[word_idx])
idx += len(words[word_idx])
word_idx += 1
return answer
solution("3people unFollowed me")
def Jaden_Case(s):
return s.title()
def solution(s):
return ' '.join([word.capitalize() for word in s.split(" ")])