Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

find prime numbers in a given range for big input python

import math
print 2
for num in range(3,101,2):
    if all(num%i!=0 for i in range(3,int(math.sqrt(num))+1, 2)):
        print (num)
Comment

PREVIOUS NEXT
Code Example
Python :: EMAIL_BACKEND where to read 
Python :: add vertical line to horizontal graph 
Python :: python iterate through list by chunks 
Python :: drop mili sencond from datetime index 
Python :: xlabel font size python latex 
Python :: get all methods of an instance 
Python :: csv.DictReader Skip Lines 
Python :: filtrar en python/how to filter in python 
Python :: pandas print nonzero in series 
Python :: cross-validation sklearn image classification 
Python :: python last element of list using reverse() function 
Python :: mechanize python #2 
Python :: how to print multiple lines in one line python 
Python :: get users except superuser django 
Python :: pygame is not defined 
Python :: torch remove part of array 
Python :: can we put the object as value in a dictionary in python* 
Python :: # to check if the list is empty use len(l) or not 
Python :: python mod of list numpy 
Python :: pandas replace column values 
Python :: allowed_hosts error ecs django 
Python :: print same index and value on each iteration of the for loop in Python 
Python :: Simple Python Permutation Printing result without for loop 
Python :: python faq call by reference 
Python :: meter replacement application 
Python :: affochage dun index du array list a deux dimension 
Python :: godot ternary 
Python :: Python NumPy transpose Function Example with use of tuples 
Python :: how to extract a list of values from numpy array using index list 
Python :: Python NumPy column_stack Function Example with 1d array 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =