case sensitive string replacement in Python

Posted by prosseek on Stack Overflow See other posts from Stack Overflow or by prosseek
Published on 2010-06-09T19:03:33Z Indexed on 2010/06/09 19:22 UTC
Read the original article Hit count: 194

Filed under:
|
|

I need to replace a string in case sensitive way. For example

abc -> def
Abc -> Def
aBc -> dEf
abC -> deF

What can I do this with Python?

© Stack Overflow or respective owner

Related posts about python

Related posts about string