title: How to copy a string to another string in python
body: <p>I have two strings, <code>s1</code> and <code>s2</code>, and I need to find if there are letters in common in both of them and make it double for example:</p>
  
  <pre><code>s1 = "Hello World"
  s2 = "lo"
  output = "Helllloo Woorlld"
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>s2="lo"
  s1="Hello World"
  
      def Str_dup(s1,s2):
          s3=str()
          d=dict()
          for i in s2:
              d[i]=True
              print i
              w=0
          for w in range(len(s1)):
              if d[s1[w]]:
                  s3[w]=s3[w]+s1[w]
              else :
                  s3[w]=s1[w]
          return s3
      Str_dup(s1,s2)
  </code></pre>
  
  <p>I get an error on:</p>
  
  <pre><code>    if d[s2[w]]:
  IndexError: string index out of range 
  </code></pre>