Your problem is quite amenable to using regular expressions, so I would recommend that here:
str = " I Like Studying Python Programming"
output = re.sub(r'(w)(?=w)', lambda m: m.group(1).upper(), str)
print(output)
This prints:
I LiKe StudyiNg PythOn ProgrammiNg
Note that this approach will not target any single letter words, since they would not be following by another word character.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…