python refresh script from shell

Trying out a simple script in the python command line interface, i noticed changes to my Python file were not reflected when i re-ran my function.

There had to be an easy way to get it to update— and there sort of was:

cd where/my/file/is
>>> import myrandomfile
>>> from importlib import reload
>>> reload(myrandomfile)

and that works!