change_occurrence_of_letter.py 126 Bytes
Newer Older
1 2 3 4 5 6 7
a=raw_input("enter a string")
b=a.replace(a[0],'$')
c=b.replace(b[0],a[0],1)
print c
"""output:
enter a string restart
resta$t