+ 1
Define
def greet(): print("Hello from a function") print("Have a great day") my question is,:does def function need indentation or not??
3 Answers
+ 5
You are creating a lot of questions.
Read the lessons carefully. Do not proceed before having read the lesson.
Test the code. Modify it. Observe what changes in the output and what does not. Write code. First, try to find an answer yourself, then create a thread.
Don't rush; take as much time as you need.
+ 4
Rouza only if the def is inside another function otherwise no
def greet():
Then the block of code
you intend to use here.
+ 2
def greet():
print("Hello from greet")
def bye():
print("Hello from bye")
bye()
greet()