pythonreference.com

search statements, functions, methods, exceptions*

show categories

define a function with return values and no arguments
import random as rd

def get_rand():
    x = rd.randint(1,10)
    return x