def modules2string(n, t, modlist): modlist = [[galois_module_knowl(n, t, z[0]), int(z[1])] for z in modlist] ans = modlist[0][0] modlist[0][1] -= 1 for j in range(len(modlist)): while modlist[j][1]>0: ans += r' $\oplus$ '+modlist[j][0] modlist[j][1] -= 1 return ans
def modules2string(n, t, modlist): modlist = [[galois_module_knowl(n, t, z[0]), int(z[1])] for z in modlist] ans = modlist[0][0] modlist[0][1] -= 1 for j in range(len(modlist)): while modlist[j][1] > 0: ans += r' $\oplus$ ' + modlist[j][0] modlist[j][1] -= 1 return ans