What this error want to say? Can't we use return without function?

Terry Reedy tjreedy at udel.edu
Mon Sep 7 05:54:56 EDT 2020


On 9/7/2020 3:34 AM, Shivlal Sharma wrote:

>>> nice = ntime(N)

>>> error: return outside of the function

Please copy and paste exact text.  Python actually said
SyntaxError: 'return' outside function
which means that a 'return' outside of a function is a syntax error.

-- 
Terry Jan Reedy



More information about the Python-list mailing list