randomness

hi
is there a way of getting an object to randomly appear in different positions from the top of the screen and move down to the bottom
i am trying to make a simple game where the player who is at the bottom of the screen has to avoid the falling objects
here is the code to get an object just go from one position to another but how do i randomize that?

import direct.directbase.DirectStart
from pandac.PandaModules import NodePath
from direct.showbase.DirectObject import DirectObject
from direct.task import Task
import direct.directbase.DirectStart
from panda3d.core import Point3
from direct.interval.IntervalGlobal import Sequence
import sys


class world(DirectObject):

    def __init__ (self):
           
       
       base.setBackgroundColor(0, 0, 0)    #Set the background to black
       base.disableMouse()
       camera.setPos ( 0, 0, 45 )          #Set the camera position (X, Y, Z)
       camera.setHpr ( 0, -90, 0 )         #Set the camera orientation
       
   
      #loading in the object and giving it a texture#
       self.Sun = loader.loadModel("models/planet_sphere")
       self.Sun.reparentTo(render)
   
      
      
      #this is making the object move#
       SunPosInterval1 = self.Sun.posInterval(5, 
                                               Point3( 0 ,-12, 0 ),
                                               startPos = Point3( 0, 15, 0 ),
                                               blendType = "easeIn")
                                   
                                                  
       self.movingSun = Sequence(SunPosInterval1,
                       name = "movingSun")
       self.movingSun.loop()
       
                                       
                                                            
      
        
w = world()                         
run() 

Use Python’s ‘random’ module.

thanks for the reply i will have a look at that