Answers for "declare function in python"

2

Python Functions

def my_function():
  print("Hello from a function")

my_function()
Posted by: Guest on February-01-2021
1

how to write a function in python

# We use the def keyword to write a function in python
# Format: def function_name():
# For example:
def Bark():
  print("Bark! Bark!")

# If we want to run the function
Bark()
Posted by: Guest on May-10-2021

Code answers related to "declare function in python"

Python Answers by Framework

Browse Popular Code Answers by Language