arcpy.env.workspace = r'Database Connections\adminCon.sde'
arcpy.MakeFeatureLayer_management(r'Database Connections\adminCon.sde\GISADMIN.Buildings', 'fl')
arcpy.ChangeVersion_management('fl', "TRANSACTIONAL", "GISADMIN.Oli")
arcpy.ChangeVersion_management('fl', "TRANSACTIONAL", "sde.DEFAULT")
For further information check:
How to get a search cursor on a particular version in arcpyHow to get a search cursor on a particular version in arcpy