Can someone please explain what's the asterisk and !r doing here?
I just came across this snippet on internet. It's some class called Polynomial that is instantiated with three coefficients. I looked through internet and figured that __repr__
is a representation, but how exactly does asterisk and !r works in here?
def __repr__(self):
return 'Polynomial(*{!r})'.format(self.coeffs)