+ 3
Guys vou can give me a example of "def" function?
Plz i dont understand:( he means a print?
2 Antworten
+ 4
def is just used to "define" or create a function. Let's say i want to make a function called: say_hi, and have it print a hello message.
def say_hi():
print("Hello!")
Now when you call say_hi(), the interpreter will print:
Hello!
+ 4
def can also be used in decor..