How does the sympy factorization of python get the second factor?

import sympy
x=sympy.symbols("x")
r=sympy.factor(x**7-1)
print(sympy.factor(x**7-1))
(x - 1)*(x**6 + x**5 + x**4 + x**3 + x**2 + x + 1)

how can I get the second expression (x words 6 + x words 5 + x words 4 + x words 3 + x words 2 + x + 1) before I operate? Thank you

May.27,2022

use factor_list , you can do this:

x = sympy.symbols('x')
r = sympy.symbols(x**7 - 1)
s = r / (x - 1)
print(s)
-sharp x**6 + x**5 + x**4 + x**3 + x**2 + x + 1
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45129-44af7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45129-44af7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?