change_char.py
#!/usr/bin/env python
#Filename:readfile.py
codelist=[]
codetotal=[]
f=file('input.txt','r')
for line in f.readlines():
line=line.strip('\n')
codelist=line.split(' ')
for i in codelist:
string=i
string_temp=''
for j in string:
print j
if j.isupper():
string_temp=string_temp+j.lower()
elif j.islower():
string_temp=string_temp+j.upper()
else :
string_temp=string_temp+j
print string_temp
codetotal.append(string_temp)
print codetotal
fo=file('output.txt','w')
for i in codetotal:
fo.write(i)
fo.write(" ")
f.close()
fo.clos