Infinite range in my python prime finder?
问题 I am trying to get an infinite range in my python prime number finder! here is my code! import math print "Welcome to Prime Finder!" option = raw_input("continue(y/n)") if option == "y": for num in range(1,(infinite number)): if all(num%i!=0 for i in range(2,int(math.sqrt(num))+1)): print num I am trying to get where it says (infinite number) to actually be an infinite number. Is there some value or something that I can use to find that? Any help would be greatly appreciated! 回答1: You can