+ 1
When should we use return statement in functions
Hey I just started to learn python but I don’t when i should use the print or return statement
1 Respuesta
+ 2
When you want to assign a variable you have to use return....
And note that never assign a variable to the function that is printing anything... Because that variable will become equal to None...
According to me you should always use return statement while making a complex program... As you can assign a variable with the variable that is returned by the function and you can use it later on...