+ 1

What is the use of def

Answer plzz

4th Sep 2023, 12:23 PM
Musharaf Nazir
Musharaf Nazir - avatar
2 Answers
+ 2
with def you define a function in python. here you will see an example: ------------------------- def double(x): return x*2 print(double(4)) -------------------------- this will ouput the result: 8
4th Sep 2023, 12:28 PM
Jan Markus
0
Thanks bro
4th Sep 2023, 1:00 PM
Musharaf Nazir
Musharaf Nazir - avatar