There is a simple class to create a representation of a polynomial (args are ints here):
class MyPolynomial:
def __init__(self, *args):
self.numbers = [x for x in args]
I want to create a method able to create a new polynomial, but the argument is a list, so it would work like this:
MyPolynomial.from_iterable([0, 1, 2]) == MyPolynomial(0, 1, 2)
How do I handle a list to pass it as int arguments?