How Does A Random Function In Python