How to set object's rotation from python? I have more than 100 objects and I want them to point in a particular direction depending on their position. To move them to a particular position, I used:    

bpy.context.scene.objects[""].location.xyz = ...


Is there similar command for setting the angle of rotation for an object?
I am working in a crossroad with two lanes. The position of the cars are taken as input. So according to their coordinates  they are placed on the road, pointing in the direction they need to. The track to constraint is not applying the correct direction to all of them. I checked my if condition. Some of the objects are getting hidden unnecessarily.
Here's how to set Euler rotation.
First: from mathutils import Euler
Then: obj.rotation_euler = Euler((0.3, 0.3, 0.4), 'XYZ')
If all the other track_to options are overkill. For more attribute references see the Object documentation