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