def largest_prime_factor(n):
F = []
for i in range(2,n):
if n%i == 0:
F.append(i)
print "Factors of", n, "=", F
for x in F:
for i in range(2,x):
if x%i == 0:
F.remove(x) <---- value
print "Prime factors of", n, "=", F
return
我在箭头所在的位置得到了valuerror,它表示x不在列表F中,但是我说'for F中的x:'前三行?