'To create a comma separated equation in python

how to create an undefined number equation. Lets suppose if we did not know the the value of n , then how to generate a1 , a2 , a3 ,an.

if n= 5 

a1 , a2 , a3 , a4 , a5 = 5


Solution 1:[1]

You can use the Numby package to solve a undefined number equation:

import numpy as np
 
a = np.array([[3,1], [1,2]])
b = np.array([9,8])
x = np.linalg.solve(a, b)
print(x)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rento