I wrote a class in which has a function taking several inputs by *args
, however the running result proves that it only takes arguments from the second one, as if self
takes the first one, here's a simplified code:
class incorrect():
def itera(self, *args):
for i in args:
print(i)
a = incorrect
a.itera(12, 23, 34)
And the output, 12
is lost:
23
34
What is the problem? How can I fix that?