import cmath def len_complex(a,b): cn=complex(a,b) length=abs(cn) return length