How to Print Prime Numbers from 1 to N in Python?

How to Print Prime Numbers from 1 to N in Python?