Javatpoint Logo
Javatpoint Logo

Python program to generate a random number

In Python programming, you can generate a random integer, doubles, longs etc . in various ranges by importing a "random" class.


First you have to import the random module and then apply the syntax:

See this example:


Python Basic Programs7

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA