Python List: reverse

reverse()
  • Reverses the order of the list.
Sample Code

################## get the position of a value from list

# import bge
import bge

# get the current scene
scene = bge.logic.getCurrentScene()

# get list of objects in scene
objList = scene.objects

# reverse the order of the list
objList.reverse()