+ 4

def my_func(): print("spam") print("spam") my_func() and print("spam) print("spam")

Above two code give the same out put . Then what is the use of function with out atleast one argument. Using the function it takes extra two statements.

2nd Feb 2019, 6:13 PM
Hari Krishna Sahu
Hari Krishna Sahu - avatar
1 Answer
+ 4
For example in function you can use "return" statement or you can reuse it again in your code.
2nd Feb 2019, 7:05 PM
Hubert Dudek
Hubert Dudek - avatar