s = "AAACQUIRED"d = {}for i in xrange(2): x = raw_input("what symbol would you like to replace?\n") y = raw_input("what symbol would you like to replace it with?\n") d[y]=x s = s.replace(x,y) print s a = raw_input("Which letter would you like to delete\n")old = d.pop(a)s = s.replace(a,old)print s
A # C $ #
what symbol would you like to replace? what symbol would you like to replace it with? ###CQUIRED what symbol would you like to replace? what symbol would you like to replace it with? ###$QUIRED Which letter would you like to delete AAA$QUIRED
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!