I am trying to make a def function that uses ra_input, and the data is to be used outside the function. The function is to be called many times.
var1=""
var2=""
theresult=""
def getstuff():
theresult = raw_input("Enter your result")
print "Here is the result:"
print theresult
no result appears.
Tried return, and tried return(), and tried return result, and tried return(result),
anyone help??
Also why the box below unformatted when I type the question??
The cleanest way would probably be:
Another option would be to use
global, but I don’t think it would be justified here.