slecting more than one bone ?

I am trying to write a script that adds a ik constraint ,
sets the chain count and sets the target of all the bones in the amature.
The following script will do what I want to the mHipLeft bone if it is
sclected. How do I make the script work for more than one bone?

import bpy
import bpy .ops


bpy.context.object.pose.bones[“mHipLeft”].constraints[“IK”]. chain_count = 1
bpy.context.object.pose.bones[“mHipLeft”].constraints[“IK”].target =[‘Empty.015’]

bpy.context.object.pose.bones[“mKneeLeft”].constraints[“IK”]. chain_count = 1
bpy.context.object.pose.bones[“mKneeLeft”].constraints[“IK”].target =