def change_string(str_test):
for single_word in str_test:
if 'a' <= single_word <= 'z':
str_test = str_test.replace(single_word, chr(ord(single_word) + 32))
return str_test
print(change_string('This is string example….wow!'))
print(change_string('Welcome To My World'))
#结果:
#T
….!
#W
T M W