title: Findin a pattern in a string with loops in python
body: <p>I'm trying to write a function that will determine whether a given pattern exists in a given string. For example "abc" in "afewtabcks"
  To do this, I have written a main function that will prompt for inputs, and then call another function ("match") to determine whether the pattern entered exists in the entered string. The problem is I have no idea how to loop through a string to check for patterns without using any substring methods.</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>def main():
      string=input("String")
      pattern=input("Pattern")
      if match==True:
          print "A perfect match!"
      else match==False:
          print "Better try again..."
  
  def match(string, pattern):
      for i in range (len(string)-len(pattern)+1):
  </code></pre>