Generating a random float from -1 to 1

So I’m placing 40 random objects on the screen but the setPos() only takes in values from -1 to 1 for X and Y. There’s no random function, that I know, that will generate a random float between those values and I’m not sure how to translate random values based on the screen size and put them in coordinates I can use.

Any ideas?

import random
random.uniform(-1, 1)