title: How do you find the first m twin primes?
body: <p>My program is supposed to find the first m twin primes and print that they are.</p>
  
  <pre><code>def isItPrime(n):
      tests = primes.copy()
      while len(tests) != 0:
      if n % tests[-1] == 0:
       return False
  elif n % tests[-1] != 0:
      tests.pop()
    if len(tests) == 0:
      primes.append(n)
      return True
  def findTwinPrimes(a , b): 
    if isItPrime(a) == True:
      if isItPrime(b) == True:
        if b - a == 2:
          print(a, "-", b, "is a twin prime")
  def firstMTwinPrimes(m):
    o = 0
    i = 1
    if o &lt; m :
     print(i)
     k = 3
     l = 5
     findTwinPrimes(k,l)
     k += 1
     l += 1
     o += 1
  firstMTwinPrimes(7)
  </code></pre>
  
  <p>Currently, it runs without errors but also does not work. The i is to check how many times the program runs and it only runs once. I do not know why becuase if o is less than m it should run again. Also for 3 and 5, they are twin primes but it doesn't work for them. isItPrime is already implemented to check if a number is prime or not. It returns the answer.</p>