Had a problem in def function! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Had a problem in def function!

Anybody please clear def function in Python

14th Jul 2017, 4:58 AM
Shadow Windster
Shadow Windster - avatar
3 Answers
+ 6
def f_name allows you to define method/function named f_name in Python (and Ruby :) What seems to be the problem with it?
14th Jul 2017, 5:31 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
What about are you talking? @@ Is it about Python 'def' keyword in Python?
14th Jul 2017, 5:22 AM
visph
visph - avatar
+ 2
def = define # Defining a function def my_function(): print("My function is called") # Calling a function my_function() # Defining a function with parameters def my_func(a, b): print(a + b) # Calling the function my_func(2, 7)
14th Jul 2017, 9:35 AM
Boris Batinkov
Boris Batinkov - avatar