If you assign the result of calling a void function to a variable in Python, you get:
#if you assign an void function (a function that returns nothing) to a variable,
#then the code that is inside the function will be executed, while the
#value of the variable will be None
def printValue():
print('hello world')
x = printValue() # will printed hello world
print(x) #will printed None
Comments
Leave a comment