5 ms·
You're right! To DEFine a FUNction, you should naturally type `def`, not `fun`. By the way, I tried to define a variable and got >>> def x = 3 File "<std
by skrishnamurthi 10y ago
You're right! To DEFine a FUNction, you should naturally type `def`, not `fun`. By the way, I tried to define a variable and got
>>> def x = 3
File "<stdin>", line 1
def x = 3
^
SyntaxError: invalid syntax
What's up with that? Is that not also a DEFinition?
- lmm 10y agoYeah, that should work (well, "def x: 3" should work). In my preferred language it does work.