How to Make a Collision Script?

Hello, I am fairly new to python and I am wondering how to write a script to sense when the player collides with another object property. I know this can easily be done with logic bricks but I am trying to save time in the long run. Thank you!

To specify I want to know how to convert a collision sensor logic brick into a python script to use in the Blender Game Engine.

Thanks for the link, but it didn’t really explain how to detect collisions with specific objects in a python script.

I know this is an old thread but I have a certain purpose adjoining the topic and need help with the alike. I need a way to get a neutral point in an action for finding equilibrium and here is how I am analysing the problem.print(str([a.getReactionForce() for a in cont.sensors[‘Touch’].hitObjectList]))