I am learning to program and I use Python to run. There I see that I can do something like this:
>>>> def myFunction(): return 1 >>>> test = myFunction >>>> test() 1
However, if I try to do the same with print , this fails:
>>>> test2 = print File "<stdin>", line 1 test2 = print ^ SyntaxError: invalid syntax
Why is print different from the function I'm creating? This uses Python v2.7.5.
Lilahf
source share