lundi 15 février 2016

How can I store a result of a function in a variable in Python?

I'm trying to store the result of random.random into a variable like so:

import  random

def randombb():
 a = random.random()
    print(a)

randombb()

How can I properly get a?

Thanks.




Aucun commentaire:

Enregistrer un commentaire