[Python] Why does print("Hello") work outside a function, but not inside one? [closed]

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

  1. Stack

    Stack Membro Participativo

    I wrote this code:

    print("Hello")


    It works fine. But when I try to put it inside a function like this:

    def say_hello():
    print("Hello")


    Nothing happens when I run it. Am I doing something wrong? How do I make the function run?

    Continue reading...

Compartilhe esta Página