[Python] Unable to use list for positional arguements

Discussão em 'Python' iniciado por Stack, Outubro 24, 2024.

  1. Stack

    Stack Membro Participativo

    So I am working on a small project and I can't for the life of me figure our why this doesn't work....

    I am using a list for positional arguments, yet it returns that parametres are missing, I know its probably something basic but I can't seem to figure it out..

    If is just place the write out the list direction in function it works, but it doesn't seem to want to work with the contesetants list.

    Hoping someone can help here!

    class Tester():
    def __init__(self, first: int, second: int, third: int) -> None:
    self.first = first
    self.second = second
    self.third = third

    contestants = [54, 56, 32]

    print(Tester(contestants))

    Continue reading...

Compartilhe esta Página