title: Python Error string indices must be integers
body: <pre><code>def is_double_char(str):
    end = len(str)+1
    print(type(end))
    for i in range(1, len(str)): 
      add_one = i+1
      print(type(i))
      print(type(add_one))
      if  str[add_one, end].find(str[i]) != -1:
          return True
    return False
  </code></pre>
  <p>This is the code that I have. The method should find if the string contains 2 or more of the same character.</p>
  <pre><code>print(is_double_char(&quot;hello&quot;))
  ______________________________
  &lt;class 'int'&gt;
  &lt;class 'int'&gt;
  &lt;class 'int'&gt;
  ---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-21-606a7223e550&gt; in &lt;module&gt;()
  ----&gt; 1 print(is_double_char(&quot;hello&quot;))
  
  &lt;ipython-input-20-b1c815934cad&gt; in is_double_char(str)
        6     print(type(i))
        7     print(type(add_one))
  ----&gt; 8     if  str[add_one, end].find(str[i]) != -1:
        9         return True
       10   return False
  
  TypeError: string indices must be integers
  </code></pre>
  <p>I don't understand. From my debug prints, all of my indices are already integers. Can someone please help? Thank you.</p>