def gf_strip(f):
 if ((not f) or f[0]):
  return f
 k = 0
 for coeff in f:
  if coeff:
   break
  else:
   k += 1
 return f[k:]

def gf_strip ( f ) : if ( ( not f ) or f [ 0 ] ) : return f k = 0 for coeff in f : if coeff : break else : k += 1 return f [ k : ]
remove leading zeros from f .