About return


what does mean return in python?


that the function returns (hands you something) back, which we can then capture in a variable for example:

def example():
    return "hello world"

# calling the function
# storing returned result in x variable
x = example() 
# print the variable
print x


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.