[Tutor] Please help
Steven D'Aprano
steve at pearwood.info
Wed Jan 2 03:14:51 CET 2013
On 02/01/13 13:02, Jack Little wrote:
> I do not understand my error (it says something about an out-of-function return on line 179)
You cannot use "return" unless it is inside a function.
# This is okay.
def test():
print "test"
return "testing complete" # indented, therefore inside the function
# this is not okay
def test():
print "test"
return "testing complete" # not indented, therefore not inside the function
--
Steven
More information about the Tutor
mailing list