+ 1

Python. Can someone please explain me for what do we use def ()?

30th Apr 2019, 8:10 AM
JohnSia2005
2 Réponses
+ 10
def is a keyword that is used to define a function in python e.g.👇 #function definition def sum(a,b): return a+b #function calling print(sum(7, 6)) Output:👉13 ----------------------------------------------------- hope you got the answer 🤙
30th Apr 2019, 8:22 AM
Mohd Abdul Sameer
Mohd Abdul Sameer - avatar
+ 1
def is used to define functions def func(): Func statements func() #Execution/Calling
30th Apr 2019, 8:15 AM
Kartik
Kartik - avatar