求整数的素数因子分解

编写函数对整数进行素数分解 返回素数的分解式 ,例如输入60,则输出60=223*5
请问怎么编程用Python

def getFactor(n):
    a=[]
    m=n
    while n>1:
        for i in range(2,n+1):
            if n%i==0:
                a.append(i)
                n//=i
                break
    b='{}='.format(m)
    for s in a[:-1]:
        b+='{}*'.format(s)
    b+=str(a[-1])
    return b