title: How to check if string is similar to any string in list
body: <p>I am trying to figure out if my string is similar to any list of items in list. My error is that it only iterates up to my list size, not for the length of my singular string. Any suggestions?</p>
  <pre><code>my_string = &quot;aplpe&quot;
  my_list=[&quot;orange&quot;, &quot;apple&quot;, &quot;grape&quot;]
  correctamount=0
      if(my_string in my_list):
          print(&quot;Passed&quot;)
      else:
          if any(my_string in s for s in my_list):
              for i in range(len(my_string) + 1):
                  if my_string[i] == my_list[i][i]:
                      correctamount += 1
                      print(correctamount)
                  else:
                      correctamount == 0
                      print(correctamount)
  
              if((correctamount/len(my_list) + 1 ) &gt; .75):
                  print(&quot;Passed&quot;)
              else:
                  print(&quot;Failure&quot;)
  </code></pre>