New python functions not working in notebook, all giving <function __main__.[function]()> as output

Hi there,

Over the last couple of weeks I’ve started playing around with python again after a long hiatus. Over this time I’ve been using python 3 on Jupyter notebook without any issues, until today.

Now, whenever I write a new function, no matter what the function was intended to do, it always gives an output of “<function main.function>”, where [function] is whatever I named the function. That’s all it returns, not doing anything it was intended to.

Strangely, any function written and saved before this began happening still functions perfectly normally, giving the intended output, but if I write a new function in the same file, the old function will continue to work correctly, while the new one will give the strange output. It’s not just an issue with the file, I’ve tried it in new and old files, all producing the same issue.

Any ideas whats going wrong and how to solve it? Any help is much appreciated.