I am very new to Python, and programming in general. I am trying to write a program that spits out prime factors of a large number. I wrote a code that gives me prime numbers, but it takes way too long to execute:
for b in range("really large number"):
if b%2!=0 and b%3!=0 and b%5!=0 and b%7!=0 or b==2 or b==3 or b==5 or b==7:
print b
If anyone has some ideas of how to speed it up let me know. Also, if someone could point me in the right direction to using those prime numbers to find that same "really large number"'s prime factors, I'd really appreciate it. Thanks