title: Range is too large Python
body: <p>I'm trying to find the largest prime factor of the number x, Python gives me the error that the range is too large. I've tried using x range but I get an OverflowError: Python int too large to convert to C long</p>
  
  <pre><code>x = 600851475143
  maxPrime = 0
  
  
  for i in range(x):
      isItPrime = True
      if (x%i == 0):
          for prime in range(2,i-1):
              if (i%prime == 0):
                  isItPrime = False
          if (isItPrime == True):
  
              if (i &gt; maxPrime):
                  maxPrime = i;
  
  print maxPrime
  </code></pre>