Python


#1

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


#2

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


#3

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