One statement for multiple

I have a code with statements like this


mc1.onRelease= mcfunction
mc2.onRelease= mcfunction
mc3.onRelease= mcfunction
mc4.onRelease= mcfunction
mc5.onRelease= mcfunction
mc6.onRelease= mcfunction
mc7.onRelease= mcfunction
mc8.onRelease= mcfunction
mc9.onRelease= mcfunction

Is there a way to cut down the number of statements in this case?