fork download
  1. s = "AAACQUIRED"
  2. d = {}
  3. for i in xrange(2):
  4. x = raw_input("what symbol would you like to replace?\n")
  5. y = raw_input("what symbol would you like to replace it with?\n")
  6. d[y]=x
  7. s = s.replace(x,y)
  8. print s
  9.  
  10. a = raw_input("Which letter would you like to delete\n")
  11. old = d.pop(a)
  12. s = s.replace(a,old)
  13. print s
  14.  
  15.  
  16.  
  17.  
Success #stdin #stdout 0.01s 7696KB
stdin
A
#
C
$
#
stdout
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