Your python code here! (Slow but functional.)


 





Reason:  


Now \( {9 \choose 2} \cdot 7= \frac{9\cdot 8 \cdot 7}{2} = 252\) and \( \frac{5!}{2!2!}=5\cdot 3\cdot 2=30\) and \(\frac{5!}{3!}=5\cdot 4=20\).

So the total number is \( 252\cdot 30+252\cdot 20=252\cdot 50  = 12600\).