# Random Numbers

The **random** module can be used to make random numbers in Python. The function random() generates a number between 0 and 1.

**Online Courses**

### Generate random nubers

**Generate a real number between 0 and 1**

Simply call the random() method to generate a real (float) number between 0 and 1.

import random |

**Generate a number between 0 and 50**

We use the randint() method to generate a whole number.

import random |

**Generate a random number between 1 and 10**

Change the parameters of randint() to generate a number between 1 and 10.

import random |

### List of random numbers

To generate a list of 100 random numbers:

import random |

### Choosing random items from a list

To get 3 random items from a list:

import random |