Python code editor

What is the best way to edit a Python file in command line on mac?

Use any of the standard editors: vim, emacs, nano.

I like to use the nano editor, just type nano filename.py and you are good to go!