this script is supposed to swap case in words but the result is really weird and doesn't make sense
def swap_case(s):
for i in range(len(s)):
if s[i].islower():
s= s.replace(s[i],s[i].upper())
elif s[i].isupper():
s= s.replace(s[i],s[i].lower())
else:
pass