title: Python: Finding a string within a string
body: <p>I have two parameters, both strings, and I need to find the index of where the second string is found within the first string. I can do this when it's just one character but not when its more. Here is an example of the one I can do:</p>
  
  <pre><code>  for i, j in enumerate(primary):
          if final == j:
              index = i
              break
  </code></pre>
  
  <p>This is what I tried for the problem:</p>
  
  <pre><code>    for i in range (0,len(initial),1):
          for j in range (len(initial), i, -1):
              if initial[i:j] == last:
                  index_str = i
                  break
  </code></pre>
  
  <p>However, it always returns "None" so can anyone help me with this?</p>