get objects?

How can i get objects that have “X_” at the beginning of its name
Example:
I have five objects:
X_cube
X_sphere
X_plane
Monkey
Icosphere

How can i get object that have "X_"in its name without writing
Bge.logic.getCurrentScene().objects one by one?


from bge.logic import getCurrentController
...
  myXObjects = getObjectsByPrefix("X_")
...
def getObjectsByPrefix(prefix):
   scene = getCurrentController().owner.scene
   return [gameObject for gameObject in scene.objects
           if gameObject.name.startswith(prefix)]