+ 2

How to use "def" in python ?

How to use "def" in python ?

15th Oct 2017, 9:12 AM
Бондаренко Алексей Максимович
Бондаренко Алексей Максимович - avatar
1 Answer
+ 4
def is the keyword for declaring a function: def myfunction(): print("hello") myfunction() # calls myfunction which prints hello
15th Oct 2017, 9:31 AM
Chrizzhigh
Chrizzhigh - avatar