# Sum of n-th roots of unity is zero.

n=10; for i in range(1,n): v=solve(x^i - 1,x); sum_roots = 0; m=i; for j in range(0,i): sum_roots += v[j]; # error here .. I want the values, not the expression print ' sum of n-th roots of ' ; print m; print ' is '; print sum_roots ;

How do i get the values from the list of expressions returned by solve? I have another Question-: How can I see all the member functions of any type,say expression..I have tried putting ? sfter the command, but that does not give all the member functions.