what is use of return in python? and what is meaning of def spam():


the function literally hands you something back:

def example():
    return 12

// call function
// store returned result in variable x
x = example()
print x // gives 12

spam() is just the name of the function. or in my case, i named the function example


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