1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Python: Default Argument [closed]

Discussão em 'Python' iniciado por Stack, Maio 7, 2025.

  1. Stack

    Stack Membro Participativo

    Why is it that when i run (on VS code):

    def add(a, b):
    return a+ b

    add()


    I receive a Traceback (as I should), but when I run:

    def add(a, b):
    return a + b
    add(7, 8)


    no return value is displayed except I invoke print(add(7, 8)) what's the difference between add() and add(7, 8)?

    Continue reading...

Compartilhe esta Página