List Prime numbers using function in Python

A prime number is a natural number, which is greater than 1 that has no positive divisors other than 1 and itself. In python, range of prime number can be found using for loop and function. Found the coding in Prime Number in Python.