| 1 | initial version |
To actually return a value you need to use the keyword return
def f():
return 3
Then you can do
sage: f()
3
sage: a = f()
sage: a
3
| 2 | No.2 Revision |
To actually return a value you need to use the keyword return as in
def f():
return 3
Then With the above example you can do
sage: f()
3
sage: a = f()
sage: a
3
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.