title: Python - Is there a way to replace a string when it's mixed with uppercase and lowercase letters?
body: <p>If a word has d' or 's in it, I want to replace it with d'$ and $'s.</p>
  <p>Using word.lower(), it was completed to check whether the capitalized word contains d' and 's. However, I don't know how to replace capitalized strings with d'$ and $'s.
  Is there a way to change it <strong>without using regex</strong>?</p>
  <pre class="lang-py prettyprint-override"><code>x = &quot;D'you d'yeh IT'S she's love&quot;
  x = x.split()
  
  b = [&quot;d'&quot;, &quot;'s&quot;]
  a = [&quot;d'$&quot;, &quot;$'s&quot;]
  y = x
  for b, a in zip(b, a):
      y = [word.replace(b, a) if b in word.lower() else word for word in y]
  
  print(y)
  </code></pre>
  <p>The current result is as follows.</p>
  <pre class="lang-py prettyprint-override"><code>[&quot;D'you&quot;, &quot;d'$yeh&quot;, &quot;IT'S&quot;, &quot;she$'s&quot;, 'love']
  </code></pre>
  <p>The result I want is as follows.</p>
  <pre class="lang-py prettyprint-override"><code>[&quot;D'$you&quot;, &quot;d'$yeh&quot;, &quot;IT$'S&quot;, &quot;she$'s&quot;, 'love']
  </code></pre>
  <p>Thanks very much for your help...</p>