A function stores instructions until you call it.
Use def, a function name, parentheses, a colon, and indented code to define a reusable action.
def greet():
print("Hello from Python!")
greet()
greet()Defining greet does not run its body. Each greet() call runs the indented print instruction.
Change one value or function call, then explain how the result changes.
Keep this in mind: Read the function definition and its calls before predicting the result.
def greet():
print("Hello from Python!")
# Change the message, then call greet more than once
greet()Run the example, then change one value and observe the result.
