I just learned (am learning) how function parameters work in Python, and I started experimenting with it for no apparent reason, when this:
def jiskya(x, y):
Consider following examples:
Function without return statement
Print() function type is none type..
def test1():
print("code...!!!")
type(test1())
Output: code...!!!
NoneType
Function with return statement
Returning variable 'a' which holds print() function, that's why type() returns data type of print function which is NoneType, not the data type of what's inside the print funcion:
def test1():
a= print("code...!!!")
return a
type(test1())
Output: code...!!!
NoneType
Here function returning data type of variable 'a' which holds a string in it.
def test1():
a = "First code...!!!"
return a
type(test1())
Output: str